oasis/src/assets/style.css

416 lines
7.6 KiB
CSS
Raw Normal View History

:root {
2019-09-30 18:18:29 +00:00
/*
* according to https://www.color-blindness.com/color-name-hue/
*
* amber
* chartreuse
* free-speech-green (lime)
* aqua
* blue
* electric-indigo
* hot-magenta
*/
--red: var(--base08);
--orange: var(--base09);
--yellow: var(--base0A);
--green: var(--base0B);
--cyan: var(--base0C);
--blue: var(--base0D);
--violet: var(--base0E);
2019-09-30 18:18:29 +00:00
--magenta: var(--base0F);
/* convenience */
--bg: var(--base00);
--bg-status: var(--base01);
--bg-selection: var(--base02);
--fg-alt: var(--base03);
--fg-status: var(--base04);
--fg: var(--base05);
--fg-light: var(--base06);
--bg-light: var(--base07);
2019-09-30 18:18:29 +00:00
2019-12-13 22:25:39 +00:00
/* rhythm */
--rhythm: 1.5rem;
--small: 1rem;
--smaller: 0.5rem;
--measure: 36rem;
2019-09-30 18:18:29 +00:00
/* size */
2019-12-13 22:25:39 +00:00
--thin: 0.0625rem;
--medium: 0.25rem;
--thick: var(--smaller);
--common-radius: var(--medium);
}
* {
scrollbar-color: var(--fg-status) var(--bg);
}
::selection {
background-color: var(--bg-selection);
2019-12-15 00:06:44 +00:00
color: var(--fg-light);
}
html {
display: flex;
font-family:
system-ui,
-apple-system,
BlinkMacSystemFont,
"Segoe UI",
"Roboto",
"Oxygen",
"Ubuntu",
"Cantarell",
"Fira Sans",
"Droid Sans",
"Helvetica Neue",
sans-serif;
justify-content: center;
font-size: 12pt;
line-height: 1.5;
margin: 0;
padding: 0;
}
2019-12-07 23:22:00 +00:00
main {
margin: 0;
2019-12-07 23:22:00 +00:00
}
/* https://www.desmos.com/calculator/3elcf5cwhn */
2019-11-29 20:45:22 +00:00
h1 { font-size: 133%; } /* 4 / 3 */
h2 { font-size: 115%; } /* 8 / 7 */
h3 { font-size: 105%; } /* 16 / 15 */
h4 { font-size: 103%; } /* 32 / 31 */
h5 { font-size: 101%; } /* 64 / 63 */
h6 { font-size: 100%; } /* 128 / 127 */
h1,
h2,
h3,
h4,
h5,
h6 {
2019-12-13 22:25:39 +00:00
margin: var(--small) 0;
}
ul,
ol {
2019-12-13 22:25:39 +00:00
padding-left: var(--rhythm);
}
a {
color: var(--blue);
}
button {
cursor: pointer;
2019-12-14 22:50:54 +00:00
background: var(--fg);
color: var(--bg);
2019-12-15 00:06:44 +00:00
border: var(--thin) solid var(--fg);
2019-12-13 22:25:39 +00:00
padding: var(--smaller) var(--small);
border-radius: var(--common-radius);
}
2019-12-12 22:37:36 +00:00
select,
input {
background: var(--bg);
color: var(--fg);
2019-12-15 00:06:44 +00:00
border: var(--thin) solid var(--bg-selection);
2019-12-13 22:25:39 +00:00
padding: var(--smaller);
margin-right: var(--small);
-moz-appearance: none;
appearance: none;
2019-12-14 22:50:54 +00:00
border-radius: var(--common-radius);
}
2019-06-25 17:18:45 +00:00
pre {
2019-06-25 16:52:34 +00:00
overflow-x: auto;
2019-09-30 18:18:29 +00:00
background-color: var(--bg);
padding: var(--smaller);
2019-09-24 21:51:15 +00:00
font-size: 92%;
border-radius: var(--common-radius);
2019-12-13 22:25:39 +00:00
border: var(--thin) solid var(--bg-status);
}
.message code {
max-width: 100%;
overflow-wrap: break-word;
padding: 0.125em 0.25em;
margin: 0;
font-size: 85%;
background-color: var(--bg);
border-radius: var(--common-radius);
border: var(--thin) solid var(--bg-status);
}
.message pre code {
color: inherit;
padding: 0;
margin: 0;
font-size: 100%;
background-color: initial;
border: initial;
border-radius: initial;
}
.message blockquote {
margin-left: 0;
border-left: var(--thick) solid var(--bg-status);
padding-left: var(--small);
}
.profile > img,
.profile > h1 {
display: inline-block;
}
.profile > img {
width: 4rem;
height: 4rem;
margin-right: var(--small);
border-radius: var(--common-radius);
}
2019-12-15 00:06:44 +00:00
.private {
border-left: var(--medium) solid var(--violet);
}
.message img,
.message video {
max-width: 100%;
2019-12-13 22:25:39 +00:00
max-height: 100vh;
border: var(--thin) solid var(--bg-status);
border-radius: var(--common-radius);
}
.message.thread-target {
border: var(--thin) solid var(--blue);
box-shadow: 0 0 var(--medium) var(--blue);
}
.message audio {
width: 100%;
}
.message > :first-child {
margin-top: 0;
padding-top: 0;
}
.content > :last-child {
margin-bottom: 0;
}
@media screen {
html {
min-height: 100%;
2019-09-30 18:18:29 +00:00
color: var(--fg);
background-color: var(--bg-status);
}
body {
2019-06-29 21:19:25 +00:00
width: 100%;
2019-12-13 22:25:39 +00:00
max-width: var(--measure);
margin: 0;
}
}
nav {
margin: var(--small) 0;
}
nav > ul > li > a {
2019-09-30 18:18:29 +00:00
color: var(--fg);
text-decoration: none;
font-weight: bold;
}
nav > ul > li > a.current {
text-decoration: underline;
}
section {
padding: var(--small);
border-radius: var(--common-radius);
margin: var(--thick) 0;
box-shadow: 0 var(--thin) var(--thin) rgba(0, 0, 0, 0.33);
2019-06-28 20:55:05 +00:00
word-wrap: break-word;
2019-12-13 22:25:39 +00:00
background: var(--bg);
}
2019-06-28 20:55:05 +00:00
.message > header.metadata {
2019-12-13 22:25:39 +00:00
height: var(--rhythm);
display: flex;
2019-12-13 22:25:39 +00:00
margin-bottom: var(--small);
}
.message > header > a > .avatar {
2019-12-13 22:25:39 +00:00
width: var(--rhythm);
height: var(--rhythm);
border-radius: var(--common-radius);
2019-12-13 22:25:39 +00:00
margin-right: var(--smaller);
}
2019-12-15 00:06:44 +00:00
textarea {
background-color: var(--bg);
box-sizing: border-box;
display: block;
font-size: var(--small);
padding: var(--small);
resize: vertical;
width: 100%;
margin: var(--small) 0;
height: 12rem;
border: var(--thin) solid var(--bg-selection);
border-radius: var(--common-radius);
color: var(--fg);
}
button:focus,
input:focus,
select:focus,
textarea:focus {
border-color: var(--blue);
}
.message > footer > a,
.message > footer > form > button {
2019-09-30 18:18:29 +00:00
color: var(--fg);
font-weight: bold;
}
.message > header > .text > .author {
font-weight: bold;
}
.message > header > .text > .author > a {
2019-09-30 18:18:29 +00:00
color: var(--fg-light);
text-decoration: none;
}
/*
* HACK: centered-footer
*
* When someone likes a message we want to submit the form and then redirect
* them back to the original page. Unfortunately when you link to anchor tags
* that scrolls the browser so that they're at the *top* of the page, not the
* center of the page. In our view we have an empty div with an appropriate
* anchor tag, so here we use CSS to center it on the screen.
*
* The code below creates padding-top that takes up 50% of the height of the
* viewport and then gets rid of it with negative margin. This has no effect
* on the display of the item, but means that when we link to the anchor tag
* it centers this empty element vertically on the screen.
*
* We also use `pointer-events: none` to ensure that this invisible div doesn't
* capture cursor events (clicks, drags, etc) on surrounding elements, because
* otherwise we could have a problem where someone clicks above the invisible
* div but the browser things they're clicking the gigantic amount of padding.
*/
.message > .centered-footer {
padding-top: 50vh;
margin-top: -50vh;
pointer-events: none;
}
2019-08-07 02:44:09 +00:00
.message > footer {
display: flex;
justify-content: space-between;
2019-12-13 22:25:39 +00:00
margin-top: var(--small);
2019-08-07 02:44:09 +00:00
}
.message > footer > * {
text-decoration: none;
}
.message > footer > form > button.liked {
color: var(--red);
}
label {
display: block;
2019-12-12 23:38:20 +00:00
margin: 0;
}
.message > footer > form > button {
display: inline-block;
border: 0;
background: transparent;
cursor: pointer;
padding: 0;
}
2019-09-19 20:31:47 +00:00
nav > ul {
display: flex;
justify-content: space-between;
margin: 0;
2019-09-19 20:31:47 +00:00
padding: 0;
}
nav > ul > li {
list-style: none;
}
.profile {
2019-12-13 22:25:39 +00:00
margin-top: var(--rhythm);
display: flex;
2019-12-13 22:25:39 +00:00
margin-bottom: var(--rhythm);
}
progress {
display: block;
width: 100%;
}
2019-09-29 17:52:51 +00:00
progress::-moz-progress-bar,
progress::-webkit-progress-value,
progress {
background: var(--blue);
border-color: var(--blue);
}
2019-08-13 20:53:11 +00:00
/* content warning! */
summary {
2019-12-13 22:25:39 +00:00
padding: var(--small) var(--smaller);
background-color: var(--bg-status);
2019-12-12 03:32:41 +00:00
margin: 0;
cursor: pointer;
2019-12-13 22:25:39 +00:00
color: var(--fg-status);
border: var(--thin) solid var(--bg-selection);
2019-08-13 20:53:11 +00:00
}
.md-mention {
-moz-user-select: all;
-ms-user-select: all;
-webkit-user-select: all;
user-select: all;
background: none;
font-size: 50%;
}
2019-10-08 01:53:21 +00:00
table {
width: 100%;
2019-12-15 00:06:44 +00:00
table-layout: fixed;
2019-10-08 01:53:21 +00:00
}
td,
th {
2019-12-13 22:25:39 +00:00
padding: var(--smaller);
outline: var(--thin) solid var(--bg-status);
2019-10-08 01:53:21 +00:00
}
th {
text-align: left;
background-color: var(--bg-status);
}
2019-12-07 23:22:00 +00:00
input[type="search"] {
width: 100%;
2019-12-15 00:06:44 +00:00
margin: var(--small) 0;
}
hr {
border: var(--thin) solid var(--fg-alt);
2019-12-07 23:22:00 +00:00
}