jlelse
/
Indiego
Archived
1
Fork 0
This repository has been archived on 2020-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
Indiego/assets/css/style.scss

160 lines
2.6 KiB
SCSS
Raw Normal View History

2020-05-24 07:30:26 +00:00
$colors: (
background: #fff,
background-dark: #000,
primary: #000,
primary-dark: #fff
);
@mixin color($property, $varName) {
#{$property}: map-get($colors, $varName);
#{$property}: var(--#{$varName}, map-get($colors, $varName));
}
@mixin color-border($property, $val1, $val2, $varName) {
#{$property}: #{$val1} #{$val2} map-get($colors, $varName);
#{$property}: #{$val1} #{$val2} var(--#{$varName}, map-get($colors, $varName));
}
@mixin lightmode {
--background: #{map-get($colors, background)};
--primary: #{map-get($colors, primary)};
color: #000;
}
@mixin darkmode {
--background: #{map-get($colors, background-dark)};
--primary: #{map-get($colors, primary-dark)};
color: #fff;
}
2020-05-31 15:21:27 +00:00
.sans-serif {
font-family: sans-serif;
}
2020-05-24 07:30:26 +00:00
html {
@include lightmode;
@media (prefers-color-scheme: dark) {
@include darkmode;
}
scrollbar-color: var(--primary) transparent;
2020-05-24 07:30:26 +00:00
}
body {
2020-05-31 15:21:27 +00:00
@extend .sans-serif;
2020-05-24 07:30:26 +00:00
@include color(background, background);
line-height: 1.5;
margin: 0 auto;
max-width: 750px;
padding: 10px;
word-break: break-word;
overflow-wrap: break-word;
* {
@include color(color, primary);
max-width: 100%;
}
}
header {
2020-05-26 10:41:46 +00:00
@extend .border-bottom;
2020-05-24 07:30:26 +00:00
padding: 10px 0;
* {
margin-top: 0;
margin-bottom: 0;
}
2020-05-24 15:24:40 +00:00
}
h1 a, h2 a {
text-decoration: none;
2020-05-24 07:30:26 +00:00
}
img {
width: 100%;
}
2020-05-31 15:21:27 +00:00
input, textarea, button, .button {
2020-05-24 07:30:26 +00:00
@include color-border(border, 1px, solid, primary);
@include color(background, background);
@include color(color, primary);
2020-05-31 15:21:27 +00:00
@extend .sans-serif;
2020-05-24 07:30:26 +00:00
padding: 5px 10px;
border-radius: 0;
box-sizing: border-box;
text-decoration: none;
font-size: 1rem;
2020-05-24 07:30:26 +00:00
}
2020-05-31 15:21:27 +00:00
.full-width-form {
@extend .full-width;
input[type="text"], input[type="email"], textarea {
@extend .full-width;
}
}
2020-05-24 07:30:26 +00:00
blockquote {
@include color-border(border-left, 5px, solid, primary);
padding-left: 20px;
margin-left: 0;
}
pre {
padding: 10px;
@include color-border(border, 1px, solid, primary);
white-space: pre-wrap;
}
2020-05-26 10:41:46 +00:00
:not(pre) > code {
@extend .invert;
font-size: 1rem;
}
code {
font-family: monospace;
}
2020-05-24 07:30:26 +00:00
footer {
2020-05-26 10:41:46 +00:00
@extend .border-top;
2020-05-24 07:30:26 +00:00
padding: 10px 0;
* {
margin-top: 0;
margin-bottom: 0;
}
}
2020-05-26 10:41:46 +00:00
.border-top {
2020-05-24 07:30:26 +00:00
@include color-border(border-top, 1px, solid, primary);
}
2020-05-26 10:41:46 +00:00
.border-bottom {
2020-05-24 07:30:26 +00:00
@include color-border(border-bottom, 1px, solid, primary);
}
2020-05-26 10:41:46 +00:00
.invert {
@include color(color, background);
@include color(background, primary);
}
2020-05-24 07:30:26 +00:00
.fake-p {
display: block;
margin-top: 1em;
margin-bottom: 1em;
}
.flex {
display: flex;
}
.hide {
display: none;
}
.full-width {
width: 100%;
2020-06-03 07:38:09 +00:00
}
/* Twemoji */
img.emoji {
height: 1em;
width: 1em;
margin: 0 .05em 0 .1em;
vertical-align: -0.1em;
2020-05-31 15:21:27 +00:00
}