blog-css/style.scss

205 lines
3.6 KiB
SCSS
Raw Normal View History

2020-05-17 10:22:10 +02:00
// Based on write.as dark theme (CC-0): https://write.as/themes/dark-theme
2020-05-17 10:15:58 +02:00
// Set global variables for colors
:root {
--accent: #226997;
--main: #111111;
--main2: #575757;
--main3: #7d7d7d;
--background: #ffffff;
--background2: #f7f7f7;
}
body {
font-size-adjust: inherit;
2020-05-17 10:15:58 +02:00
color: var(--main);
background-color: var(--background);
h1, header h2 {
a, a:visited, a:link {
color: var(--main);
}
}
header {
p.description, nav a {
color: var(--main2);
}
}
// Disable hidden effect for ease of use on touch screens
.hidden.user.action {
opacity: 1;
color: var(--main3)
}
// Links in articles and in list view
article {
font-size: 1.2em;
2020-05-17 10:15:58 +02:00
table, p, ul {
a:not(.hashtag), a.hashtag span + span {
color: var(--main);
border-bottom: solid var(--accent) 1px;
text-decoration: none;
transition: border-bottom .12s ease;
}
a:not(.hashtag):hover, a:not(.hashtag):focus, a.hashtag:hover span + span, a.hashtag:focus span + span {
text-decoration: none;
border-color: transparent;
}
}
}
// Override for links in articles only
&#post, &#subpage {
a, a.hashtag span + span {
border-bottom-width: 2.5px;
}
}
// "Menu" dropdown, only visible to author
#manage, .dropdown-nav, #manage ul {
a {
color: var(--main);
}
ul {
background: var(--background);
li {
&:hover {
background: var(--background2);
}
a {
color: var(--main);
}
}
}
}
// Does subpage even exist?
&#post, &#collection, &#subpage {
color: var(--main);
pre, code {
background: var(--background2);
color: var(--main2)
}
pre {
background: var(--background2);
}
.post-title a {
color: var(--main);
}
a.read-more {
color: var(--main3);
}
article, #wrapper article {
&.sans {
white-space: normal;
}
h2#title {
font-size: 2em;
}
h2 {
font-size: 1.4em;
display: block;
margin: 1.5em 0 .5em 0;
2020-06-18 23:06:52 +02:00
a:nth-of-type(2)::before {
content: "\A";
white-space: pre;
}
}
h2 + time.dt-published {
color: var(--main2);
margin-bottom: 1em;
}
p {
display: block;
white-space: normal;
line-height: 1.7;
}
p, table, ul, pre, ol, blockquote {
margin: 0 0 1.5em 0;
}
li {
margin: 0;
}
ul, ol {
margin-top: -1em;
2020-08-13 23:44:05 +02:00
ul, ol {
margin: 0;
}
}
h2 + ul, h2 + ol {
margin-top: 0;
}
blockquote p:last-child {
margin-bottom: 0;
}
2020-05-17 10:15:58 +02:00
}
blockquote {
color: var(--main2);
2020-05-17 10:15:58 +02:00
}
.pic-container {
display: flex;
justify-content: space-evenly;
flex-wrap: wrap;
2020-05-17 10:15:58 +02:00
.profile-pic {
max-width: 200px;
min-width: 100px;
2020-05-20 09:06:07 +02:00
max-height: 200px;
min-height: 100px;
border-radius: 10%;
padding: 1rem;
flex-shrink: 1;
flex-grow: 0;
2020-05-17 10:15:58 +02:00
}
}
}
}
@media (prefers-color-scheme: dark) {
:root {
--accent: #226997;
--main: #eeeeee;
--main2: #cecece;
--main3: #b1b1b1;
--background: #111111;
--background2: #575656;
}
// Add transparency to the image to make it look lighter
img {
opacity: .75;
transition: opacity .5s ease-in-out;
}
img:hover {
opacity: 1;
}
// No transparency for "view draft" icon
#manage ul ul li img {
opacity: 1;
filter: invert(1);
}
}