Website/docs/assets/scss/style.scss
2020-11-25 13:34:49 +01:00

414 lines
7.4 KiB
SCSS

@import './utils/theme.scss';
@import './utils/elevation.scss';
// @import './utils/typography.scss';
@import './components/aki-button.scss';
@import './components/aki-card.scss';
@import './components/aki-divider.scss';
@import './components/aki-toolbar.scss';
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');
// TODO: Media queries for smaller screens and devices.
html {
font-size: 100%;
}
body {
display: flex;
flex-direction: column;
font-family: 'Roboto', sans-serif;
font-weight: 400;
height: 100vh;
line-height: 1.75;
margin: 0;
padding: 0;
width: 100vw;
}
p {
margin-bottom: 1rem;
}
h1,
h2,
h3,
h4,
h5 {
margin: 3rem 0 1.38rem;
font-family: 'Roboto', sans-serif;
font-weight: 400;
line-height: 1.3;
}
h1 {
margin-top: 0;
font-size: 3.052rem;
}
h2 {
font-size: 2.441rem;
}
h3 {
font-size: 1.953rem;
}
h4 {
font-size: 1.563rem;
}
h5 {
font-size: 1.25rem;
}
small,
.text_small {
font-size: 0.8rem;
}
// --------
header {
.left,
.center,
.right {
align-items: inherit;
display: inherit;
height: calc(100% - 2rem);
padding: 1rem;
}
.left {
.logo {
display: block;
filter: invert(1);
height: 3rem;
width: 3rem;
}
.title {
font-size: 1.75rem;
font-weight: 700;
letter-spacing: .03125em;
margin-left: 1rem;
@media (max-width: #{$bp-small}) {
margin-left: 0;
}
}
}
.right {
flex: 1 1 auto;
justify-content: flex-end;
text-transform: uppercase;
.dropdown-button {
display: none;
}
// TODO: Redo header media query
/*
@media (max-width: #{$bp-medium}) {
&.dropdown {
align-items: center;
cursor: pointer;
display: flex;
justify-content: center;
min-width: 4rem;
float: left;
overflow: hidden;
&:hover .dropdown-content {
// display: block;
background: $primary;
box-shadow: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23);
display: flex;
flex-direction: column;
padding: 1rem;
right: 0;
top: 5.5rem;
}
.dropdown-button {
display: initial;
}
.dropdown-content {
display: none;
position: absolute;
z-index: 1;
}
}
}
*/
}
}
main {
display: flex;
flex-direction: row;
height: 100%;
overflow: auto;
width: 100%;
aside {
background: $primary;
box-shadow: $elevation-z4;
color: $on-primary;
max-width: 20rem;
overflow-y: auto;
width: 100%;
z-index: 1;
nav {
margin: 1rem 0;
a,
div {
display: block;
padding: .25rem .5rem .25rem 1rem;
width: calc(100% - 1.5rem);
// &:hover {
// background-color: rgba($secondary,.5);
// }
}
ul {
list-style: none;
margin: 0;
padding-left: 1rem;
}
a {
color: $on-secondary;
&:hover {
filter: invert(.15);
}
&.active {
color: $accent;
}
}
// TODO: Redo list status indicator + animations
.node {
&.hide {
ul {
max-height: 0 !important;
}
div::after {
transform: rotate(-90deg);
}
}
div {
cursor: pointer;
display: flex;
&::after {
content: "🔽";
margin-right: 1rem;
text-align: right;
}
}
ul {
overflow: hidden;
}
}
}
}
article {
background: $secondary;
color: $on-secondary;
overflow: auto;
padding: 1rem 27.1% 1rem 10.4%;
width: 62.5%;
img {
max-width: 100%;
}
}
}
a {
color: $accent;
text-decoration: none;
}
// Docs typography
.doc-typography {
$alert: #AF1010;
$on-alert: #fff;
$info: #0D47A1;
$on-info: #fff;
$warning: #ffc107;
// $warning: #e65100;
$on-warning: #000;
$note: #999;
$on-note: #080808;
$code: #101010; // never use full black.
$on-code: #fff;
$blockquote: #181818;
$on-blockquote: #ccc;
// $padding: .25rem .5rem;
// $border-radius: $border-radius;
$margin: 0 0 .5rem;
table {
text-align: left;
}
blockquote {
background: rgba(255, 255, 255, .125);
border-radius: 4px;
margin: 0;
padding: .5rem .7rem;
p {
margin: 0;
}
}
/*
p,
pre ul,
li,
blockquote,
span,
code {
font-size: .875rem;
font-weight: 400;
letter-spacing: .03125em;
line-height: 1.5rem;
}
pre,
code {
background: $code !important;
}
blockquote,
code,
.doc-alert,
.doc-info,
.doc-warning,
.doc-note {
border-radius: $border-radius;
}
blockquote,
code,
pre,
.doc-alert,
.doc-info,
.doc-warning,
.doc-note {
padding: $padding;
}
blockquote,
code,
pre,
li,
.doc-alert,
.doc-info,
.doc-warning,
.doc-note {
margin: $margin;
}
blockquote {
background: $blockquote;
color: $on-blockquote;
}
// for url/links
// span,
a {
color: $accent;
cursor: pointer;
text-decoration: none;
&:hover {
filter: invert(.15);
}
}
img {
max-width: 100%;
}
.doc-alert,
.doc-info,
.doc-warning,
.doc-note {
box-shadow: $elevation-z2;
}
.doc-alert {
background: $alert;
color: $on-alert;
&::before {
content: "Alert";
display: block;
font-weight: 700;
margin: 0 0 .25rem 0;
}
}
.doc-info {
background: $info;
color: $on-info;
&::before {
content: "Info";
display: block;
font-weight: 700;
margin: 0 0 .25rem 0;
}
}
.doc-warning {
background: $warning;
color: $on-warning;
&::before {
content: "Warning";
display: block;
font-weight: 700;
margin: 0 0 .25rem 0;
}
}
.doc-note {
background: $note;
color: $on-note;
&::before {
content: "Note";
display: block;
font-weight: 700;
margin: 0 0 .25rem 0;
}
}
*/
}