]> git.plutz.net Git - httpchat/blobdiff - webchat.css
fix syntax error m)
[httpchat] / webchat.css
index 4f36157b778eaaa463f233526c9e366c31708a92..457b63247d8a2ff91640459d49d8075fa1c3abc2 100644 (file)
@@ -1,50 +1,38 @@
 * {
   box-sizing: border-box;
-  background-color: #FFF;
-  color: #000;
   font: normal normal normal medium/1.25 Sans-Serif;
   font: normal normal normal normal medium/1.25 Sans-Serif;
   text-decoration: none;
   margin: 0; padding: 0;
   border: none;
+  color: inherit;
 }
 
-#chat {
-  position: fixed;
-  bottom: 2.5em;
-  left: 0; right: 0;
+b, strong { font-weight: bold; }
+i, em { font-style: italic; }
+
+input[type=text], input:not([type]) {
   border: 1px solid #08b;
-  padding: 1ex;
-  margin: .5ex;
-  z-index: -1;
+  padding: .125ex .5ex;
 }
-form#channel {
-  position: fixed;
-  bottom: 0;
-  left: 0; right: 0;
+button {
+  border: outset #DDD;
+  padding: .125ex 1ex;
+  background-color: #EEE;
 }
 
-#check_settings { display: none; }
-#check_settings + label {
-  display: inline-block;
-}
-#check_settings + label:before {
-  content: '\2699';
-  padding: .5ex;
-  margin-left: .5ex;
-  margin-right: 2em;
-}
-#check_settings + label + #settings { display: none; }
-#check_settings:checked + label + #settings {
+#settings {
   display: block;
   position: fixed;
   min-width: 20%; max-width: 90%;
   width: 30em;
-  top: 3em;
+  bottom: 12em;
   left: 50%; transform: translate(-50%);
+  color: #000;
   background-color: #FFF;
   border: 1px solid;
   border-radius: 1ex 1ex .5ex .5ex;
+  z-index: 2;
 }
 #settings h1 {
   background-color: #08b;
@@ -55,7 +43,7 @@ form#channel {
   border-bottom: 1px solid;
   border-radius: 1ex 1ex 0 0;
 }
-#settings label[for=check_settings] {
+#settings a.settings {
   position: absolute;
   top: 0; right: 1px;
   background-color: #F88;
@@ -64,39 +52,160 @@ form#channel {
   width: 3ex;
   overflow: hidden;
 }
-#settings label[for=check_settings]:before {
+#settings a.settings:before {
   content: "x";
   padding: 0 1ex;
 }
-#settings input[type=radio] { display: none; }
-#settings input[type=radio] + label + * { display: none; }
-#settings input[type=radio]:checked + label + * { display: block; }
-#settings input[type=radio] + label {
+#settings .error {
+  padding: 1ex 1ex .5ex 1ex;
+  background-color: #FCC;
+  font-weight: bold;
+}
+#settings a.section {
   display: block;
   font-weight: bold;
   text-decoration: underline;
-  margin: -1px 1px; padding: 0 1ex;
+  margin: -1px 1px 0 0; padding: .5ex 1ex;
   border-top: 1px solid;
   background-color: #EEE;
 }
-#settings input[type=radio] + label + * {
+#settings a.section + * {
+  display: block;
+  padding: .5ex 1ex 0 1ex;
+  max-height: .5ex;
+  overflow: hidden;
+  transition: max-height .5s;
+}
+#settings .error.nick ~ a.section + #nick,
+#settings .error.register ~ a.section + #register,
+#settings a.section + .open,
+#settings a.section + *:target {
+  max-height: 20ex;
   padding: 1ex 1ex .5ex 1ex;
 }
+#settings input {margin-right: 1ex;}
 
+form#channel {
+  position: fixed;
+  bottom: 1ex;
+  left: .5ex; right: .5ex;
+}
+form#channel a.settings {
+  display: inline-block;
+}
+form#channel a.settings:before {
+  content: '\2699';
+  padding: 0 .75ex;
+  margin-left: .5ex;
+  margin-right: 2em;
+}
 form#channel input[name=message] {
   display: inline-block;
   position: absolute;
-  left: 4.5ex;
-  width: calc(100% - 5ex - 1px);
+  right: 0;
+  width: calc(100% - 4.5ex);
 }
 form#channel button[value=submit] { display: none; }
+
+#chat {
+  position: fixed;
+  bottom: 2em;
+  left: 0; right: 0;
+  padding: 1ex;
+  margin: .5ex;
+  -z-index: -1;
+}
+
+#chat p.message {
+  margin-top: .25em;
+}
+#chat p.message > * {
+  display: table-cell;
+  color: #000;
+  background-color: rgba(255, 255, 255, .5);
+  line-height: 1.5em;
+  padding: .125em 0 .125em .5em;
+}
+
 #chat .message .date {
   color: #888;
   font-size: .75em;
 }
+#chat .message .nick .indicator {
+  color: #888;
+}
 #chat .message .nick {
   font-weight: bold;
+  white-space: nowrap;
 }
-#chat .message .nick .indicator {
-  color: #888;
+#chat .message .message {
+  border-radius: 0 .5em .5em 0;
+  padding-right: .5em;
+}
+
+#chat div.nicklist {
+  position: fixed;
+  top: 1em; bottom: 3em;
+  right: 0; width: 1em;
+  background-color: rgba(255, 255, 255, .875);
+  padding: .5em;
+  z-index: 1;
+  border: 1px solid black;
+  border-width: 1px 0 1px 1px;
+  overflow-y: auto;
+  white-space: nowrap;
+}
+#chat div.nicklist:hover {
+  width: 20%;
+  min-width: 10em;
+  white-space: normal;
+}
+#chat div.nicklist h2 {
+  font-weight: bold;
+  border-bottom: 1px solid black;
+}
+#chat div.nicklist .nick {
+  margin-top: .5em;
+  display: block;
+  line-height: 1.5em;
+}
+#chat div.nicklist a.nick {
+  color: #00F;
+}
+
+body.create,
+body.front {
+  text-align: center;
+}
+body.create h1,
+body.front h1 {
+  font-size: 1.25em;
+  font-weight: bold;
+  margin: 2em 1ex 1em 1ex;
+}
+body.front h2 {
+  font-weight: bold;
+  margin: 2em 1ex 1em 1ex;
+}
+
+body.front label {
+  font-weight: bold;
+}
+
+body.front #channels {
+  display: block;
+  margin: auto;
+  width: 20em; max-width: 100%;
+  text-align: left;
+}
+body.front #channels a {
+  display: block;
+  color: #44F;
+  text-decoration: underline;
+  margin: .5em 0 0 0;
+}
+
+body.create button {
+  display: block;
+  margin: 1em auto;
 }