422 lines
11 KiB
SCSS
422 lines
11 KiB
SCSS
$base-font-size: 16px;
|
|
$base-line-height: 1.5;
|
|
$__1px: (1px/$base-font-size) * 1rem;
|
|
$base-font-family: 'Roboto, Helvetica, sans-serif';
|
|
$code-font-family: 'Roboto Mono, Menlo, Consolas, monospace';
|
|
$_body-margin: 0;
|
|
$fore-color-var: '--fore-color';
|
|
$back-color-var: '--back-color';
|
|
$secondary-fore-color-var: '--secondary-fore-color';
|
|
$secondary-back-color-var: '--secondary-back-color';
|
|
$tertiary-back-color-var: '--tertiary-back-color';
|
|
$border-color-var: '--border-color';
|
|
$universal-margin-var: '--universal-margin';
|
|
$universal-padding-var: '--universal-padding';
|
|
$universal-border-radius-var: '--universal-border-radius';
|
|
$fore-color: #212121;
|
|
$secondary-fore-color: #444;
|
|
$tertiary-fore-color: #222;
|
|
$back-color: #fff;
|
|
$secondary-back-color: #f0f0f0;
|
|
$border-color: #fff;
|
|
$token-color-a-var: '--token-color-a';
|
|
$token-color-b-var: '--token-color-b';
|
|
$token-color-c-var: '--token-color-c';
|
|
$token-color-d-var: '--token-color-d';
|
|
$token-color-e-var: '--token-color-e';
|
|
$token-color-f-var: '--token-color-f';
|
|
$token-color-g-var: '--token-color-g';
|
|
$token-color-h-var: '--token-color-h';
|
|
$token-color-a: #7a8490;
|
|
$token-color-b: #666;
|
|
$token-color-c: #005cc5;
|
|
$token-color-d: #832ed2;
|
|
$token-color-e: #067e36;
|
|
$token-color-f: #d73a49;
|
|
$token-color-g: #097cab;
|
|
$token-color-h: #e90;
|
|
$universal-margin: 0.5rem;
|
|
$universal-padding: 0.5rem;
|
|
$universal-border-radius: 0.125rem;
|
|
$heading-line-height: 1.2;
|
|
$code-font-size: 0.8125em;
|
|
|
|
@font-face {
|
|
font-family: 'Roboto';
|
|
font-style: normal;
|
|
font-weight: 400;
|
|
src: local('Roboto'), local('Roboto-Regular'), url(https://fonts.gstatic.com/s/roboto/v18/KFOmCnqEu92Fr1Mu4mxK.woff2) format('woff2');
|
|
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
|
font-display: swap;
|
|
}
|
|
@font-face {
|
|
font-family: 'Roboto';
|
|
font-style: italic;
|
|
font-weight: 400;
|
|
src: local('Roboto Italic'), local('Roboto-Italic'), url(https://fonts.gstatic.com/s/roboto/v18/KFOkCnqEu92Fr1Mu51xIIzI.woff2) format('woff2');
|
|
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
|
font-display: swap;
|
|
}
|
|
@font-face {
|
|
font-family: 'Roboto';
|
|
font-style: normal;
|
|
font-weight: 700;
|
|
src: local('Roboto Bold'), local('Roboto-Bold'), url(https://fonts.gstatic.com/s/roboto/v18/KFOlCnqEu92Fr1MmWUlfBBc4.woff2) format('woff2');
|
|
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
|
font-display: swap;
|
|
}
|
|
@font-face {
|
|
font-family: 'Roboto Mono';
|
|
font-style: normal;
|
|
font-weight: 400;
|
|
src: local('Roboto Mono'), local('RobotoMono-Regular'), url(https://fonts.gstatic.com/s/robotomono/v5/L0x5DF4xlVMF-BfR8bXMIjhLq38.woff2) format('woff2');
|
|
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
|
font-display: swap;
|
|
}
|
|
@font-face {
|
|
font-family: 'Roboto Mono';
|
|
font-style: italic;
|
|
font-weight: 400;
|
|
src: local('Roboto Mono Italic'), local('RobotoMono-Italic'), url(https://fonts.gstatic.com/s/robotomono/v5/L0x7DF4xlVMF-BfR8bXMIjhOm32WWg.woff2) format('woff2');
|
|
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
|
font-display: swap;
|
|
}
|
|
@font-face {
|
|
font-family: 'Roboto Mono';
|
|
font-style: normal;
|
|
font-weight: 700;
|
|
src: local('Roboto Mono Bold'), local('RobotoMono-Bold'), url(https://fonts.gstatic.com/s/robotomono/v5/L0xkDF4xlVMF-BfR8bXMIjDwjmqxf78.woff2) format('woff2');
|
|
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
|
font-display: swap;
|
|
}
|
|
|
|
:root {
|
|
#{$fore-color-var}: $fore-color;
|
|
#{$back-color-var}: $back-color;
|
|
#{$border-color-var}: $border-color;
|
|
#{$secondary-fore-color-var}: $secondary-fore-color;
|
|
#{$tertiary-fore-color-var}: $tertiary-fore-color;
|
|
#{$secondary-back-color-var}: $secondary-back-color;
|
|
#{$universal-margin-var}: $universal-margin;
|
|
#{$universal-padding-var}: $universal-padding;
|
|
#{$universal-border-radius-var}: $universal-border-radius;
|
|
#{$token-color-a-var}: $token-color-a;
|
|
#{$token-color-b-var}: $token-color-b;
|
|
#{$token-color-c-var}: $token-color-c;
|
|
#{$token-color-d-var}: $token-color-d;
|
|
#{$token-color-e-var}: $token-color-e;
|
|
#{$token-color-f-var}: $token-color-f;
|
|
#{$token-color-g-var}: $token-color-g;
|
|
#{$token-color-h-var}: $token-color-h;
|
|
}
|
|
|
|
html {
|
|
font-size: $base-font-size;
|
|
}
|
|
|
|
html, * {
|
|
font-family: #{$base-font-family};
|
|
line-height: $base-line-height;
|
|
// Prevent adjustments of font size after orientation changes in mobile.
|
|
-webkit-text-size-adjust: 100%;
|
|
}
|
|
* {
|
|
font-size: 1rem;
|
|
font-weight: 400;
|
|
}
|
|
|
|
a, b, del, em, i, ins, q, span, strong, u {
|
|
font-size: 1em; // Fix for elements inside headings not displaying properly.
|
|
}
|
|
|
|
body {
|
|
margin: $_body-margin;
|
|
color: var(#{$fore-color-var});
|
|
background: var(#{$back-color-var});
|
|
overflow-x: hidden;
|
|
}
|
|
|
|
// Correct display for Edge & Firefox.
|
|
details {
|
|
display: block;
|
|
}
|
|
|
|
// Correct display in all browsers.
|
|
summary {
|
|
display: list-item;
|
|
}
|
|
|
|
// Abbreviations
|
|
abbr[title] {
|
|
border-bottom: none; // Remove bottom border in Firefox 39-.
|
|
text-decoration: underline dotted; // Opinionated style-fix for all browsers.
|
|
}
|
|
|
|
// Show overflow in Edge.
|
|
input {
|
|
overflow: visible;
|
|
}
|
|
|
|
// Make images responsive by default.
|
|
img {
|
|
max-width: 100%;
|
|
height: auto;
|
|
}
|
|
|
|
h1, h2, h3, h4, h5, h6 {
|
|
line-height: $heading-line-height;
|
|
margin: calc(1.5 * var(#{$universal-margin-var})) var(#{$universal-margin-var});
|
|
}
|
|
|
|
h1 {
|
|
font-size: 6rem;
|
|
}
|
|
h2 {
|
|
font-size: 3.75rem;
|
|
}
|
|
h3 {
|
|
font-size: 3rem;
|
|
}
|
|
h4 {
|
|
font-size: 2.125rem;
|
|
}
|
|
h5 {
|
|
font-size: 1.5rem;
|
|
}
|
|
h6 {
|
|
font-size: 1.25rem;
|
|
}
|
|
|
|
p {
|
|
margin: var(#{$universal-margin-var});
|
|
}
|
|
|
|
ol, ul {
|
|
margin: var(#{$universal-margin-var});
|
|
padding-left: calc(2 * var(#{$universal-margin-var}));
|
|
}
|
|
|
|
b, strong {
|
|
font-weight: 700;
|
|
}
|
|
|
|
hr {
|
|
// Fixes and defaults for styling
|
|
box-sizing: content-box;
|
|
border: 0;
|
|
// Actual styling using variables
|
|
line-height: $horizontal-rule-line-height;
|
|
margin: var(#{$universal-margin-var});
|
|
height: $__1px;
|
|
background: linear-gradient(to right, transparent, var(#{$border-color-var}) 20%, var(#{$border-color-var}) 80%, transparent);
|
|
}
|
|
|
|
code, kbd, pre, code *, pre *, kbd *, code[class*="language-"], pre[class*="language-"] {
|
|
font-family: #{$code-font-family};
|
|
font-size: $code-font-size;
|
|
}
|
|
|
|
sup, sub, code, kbd {
|
|
line-height: 0;
|
|
position: relative;
|
|
vertical-align: baseline;
|
|
}
|
|
|
|
code {
|
|
background: var(#{$secondary-back-color-var});
|
|
padding: calc(var(#{$universal-padding-var}) / 4) calc(var(#{$universal-padding-var}) / 2);
|
|
border-radius: var(#{$universal-border-radius-var});
|
|
}
|
|
|
|
kbd {
|
|
background: var(#{$fore-color-var});
|
|
color: var(#{$back-color-var});
|
|
border-radius: var(#{$universal-border-radius-var});
|
|
padding: calc(var(#{$universal-padding-var}) / 4) calc(var(#{$universal-padding-var}) / 2);
|
|
}
|
|
|
|
pre {
|
|
overflow: auto; // Responsiveness
|
|
background: var(#{$secondary-back-color-var});
|
|
padding: calc(1.5 * var(#{$universal-padding-var}));
|
|
margin: var(#{$universal-margin-var});
|
|
border: $__1px solid var(#{$secondary-border-color-var});
|
|
border-radius: var(#{$universal-border-radius-var});
|
|
}
|
|
|
|
code[class*="language-"],
|
|
pre[class*="language-"] {
|
|
color: var(#{$tertiary-fore-color-var});
|
|
text-align: left;
|
|
white-space: pre;
|
|
word-spacing: normal;
|
|
word-break: normal;
|
|
word-wrap: normal;
|
|
line-height: 1.8;
|
|
|
|
-moz-tab-size: 2;
|
|
-o-tab-size: 2;
|
|
tab-size: 2;
|
|
|
|
-webkit-hypens: none;
|
|
-moz-hyphens: none;
|
|
-ms-hyphens: none;
|
|
hyphens: none;
|
|
}
|
|
|
|
pre[class*="language-"] {
|
|
padding: calc(2 * var(#{$universal-padding-var}));
|
|
overflow: auto;
|
|
margin: var(#{$universal-margin-var}) 0;
|
|
}
|
|
|
|
pre[class*="language-"]::-moz-selection, pre[class*="language-"] ::-moz-selection,
|
|
code[class*="language-"]::-moz-selection, code[class*="language-"] ::-moz-selection {
|
|
background: #b3d4fc;
|
|
}
|
|
|
|
pre[class*="language-"]::selection, pre[class*="language-"] ::selection,
|
|
code[class*="language-"]::selection, code[class*="language-"] ::selection {
|
|
background: #b3d4fc;
|
|
}
|
|
|
|
:not(pre) > code[class*="language-"] {
|
|
padding: .1em;
|
|
border-radius: .3em;
|
|
white-space: normal;
|
|
}
|
|
|
|
.token.comment,
|
|
.token.prolog,
|
|
.token.doctype,
|
|
.token.cdata {
|
|
color: var(#{$token-color-a});
|
|
}
|
|
|
|
.token.punctuation {
|
|
color: var(#{$token-color-b});
|
|
}
|
|
|
|
.namespace {
|
|
opacity: .7;
|
|
}
|
|
|
|
.token.property,
|
|
.token.tag,
|
|
.token.boolean,
|
|
.token.constant,
|
|
.token.symbol,
|
|
.token.deleted,
|
|
.token.function {
|
|
color: var(#{$token-color-c});
|
|
}
|
|
|
|
|
|
.token.number,
|
|
.token.class-name {
|
|
color: var(#{$token-color-d});
|
|
}
|
|
|
|
.token.selector,
|
|
.token.attr-name,
|
|
.token.string,
|
|
.token.char,
|
|
.token.builtin,
|
|
.token.inserted {
|
|
color: var(#{$token-color-e});
|
|
}
|
|
|
|
.token.operator,
|
|
.token.entity,
|
|
.token.url,
|
|
.language-css .token.string,
|
|
.style .token.string,
|
|
.token.atrule,
|
|
.token.attr-value,
|
|
.token.keyword {
|
|
color: var(#{$token-color-f});
|
|
}
|
|
|
|
.token.regex {
|
|
color: var(#{$token-color-g});
|
|
}
|
|
.token.important,
|
|
.token.variable {
|
|
color: var(#{$token-color-h});
|
|
}
|
|
|
|
.token.important,
|
|
.token.bold {
|
|
font-weight: 700;
|
|
}
|
|
.token.italic {
|
|
font-style: italic;
|
|
}
|
|
|
|
.token.entity {
|
|
cursor: help;
|
|
}
|
|
|
|
/*
|
|
blockquote {}
|
|
sup {}
|
|
sub {}
|
|
figure {}
|
|
figcaption {}
|
|
*/
|
|
|
|
// ===================================================
|
|
// Layout
|
|
// ===================================================
|
|
$grid-medium-breakpoint: 768px;
|
|
$grid-large-breakpoint: 768px;
|
|
// Grid container
|
|
.container {
|
|
display: grid;
|
|
grid-template-columns: repeat(12, 1fr);
|
|
grid-column-gap: calc(0.5 * var(#{$universal-margin-var}));
|
|
}
|
|
// Generic centered column
|
|
.col-centered {
|
|
grid-column: span 12;
|
|
@media screen and (min-width: #{$grid-medium-breakpoint}) {
|
|
grid-column: 2/12;
|
|
}
|
|
@media screen and (min-width: #{$grid-large-breakpoint}) {
|
|
grid-column: 3/11;
|
|
}
|
|
}
|
|
// 25% width - For the 'in numbers' section
|
|
.col-quarter {
|
|
grid-column: span 3;
|
|
}
|
|
// For the contributors section
|
|
.flex-row {
|
|
display: flex;
|
|
flex: 0 1 auto;
|
|
flex-flow: row wrap;
|
|
.flex-item {
|
|
flex: 0 0 auto;
|
|
max-width: 50%;
|
|
flex-basis: 50%;
|
|
@media screen and (min-width: #{$grid-medium-breakpoint}) {
|
|
max-width: 25%;
|
|
flex-basis: 25%;
|
|
}
|
|
@media screen and (min-width: #{$grid-large-breakpoint}) {
|
|
max-width: 100%;
|
|
flex-grow: 1;
|
|
flex-basis: 0;
|
|
}
|
|
}
|
|
}
|
|
// TODO: Missing the menu system layout - probably all JS, effects and slide over
|
|
// TODO: Redesign cards from scratch
|
|
// TODO: Buttons and search form only
|
|
// TODO: Top bar - header
|
|
// TODO: Side bar - nav
|
|
// TODO: Bottom area - footer
|
|
// TODO: JS + CSS for side bar functionality
|
|
// TODO: New toast
|
|
// TODO: New marks
|
|
// TODO: Components for statistics |