www-home/style.css
2020-02-07 08:10:06 -05:00

388 lines
7.0 KiB
CSS

/* http://meyerweb.com/eric/tools/css/reset/
v2.0 | 20110126
License: none (public domain)
*/
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline;
}
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
display: block;
}
body {
line-height: 1;
}
ol, ul {
list-style: none;
}
blockquote, q {
quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
content: '';
content: none;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
/* Styling Rules go here */
:root {
--border-radius: 4px;
--border-width: 8px;
--border-width-negative: -8px;
--content-width: 660px;
/* Base colors */
--color-black: black;
--color-white: white;
--color-navy: #1F2E4C;
/* Primary colors */
--color-gray: #707372;
--color-red: #EB5757;
--color-purple: #90489C;
/* Accent colors */
--color-yellow: #F2C94C;
--color-light-orange: #F7E6CA;
--color-light-green: #98E0B0;
}
* {
box-sizing: border-box;
}
body {
font-family: "Fira Mono", monaco, monospace;
background: var(--color-navy);
color: var(--color-white);
font-weight: 500;
margin: 2em .5em;
font-size: 18px;
-webkit-font-smoothing: antialiased;
}
code {
color: var(--color-light-green);
}
header {
text-align: center;
}
footer {
opacity: .5;
}
a {
color: inherit;
}
h1, h2, h3 {
-webkit-font-smoothing: none;
font-family: "Press Start 2P", "Helvetica Neue", helvetica, arial, sans-serif;
font-weight: normal;
}
h1 {
margin-bottom: .5em;
text-align: center;
font-size: 24px;
color: var(--color-light-orange);
text-shadow: 0 4px 0 rgba(0,0,0,.25);
}
header h1 a {
text-decoration: none;
}
header h1 a:hover {
text-decoration: underline
}
h2 {
font-size: 20px;
text-shadow: 0 4px 0 rgba(0,0,0,.25);
}
h3 {
font-size: 16px;
text-shadow: 0 4px 0 rgba(0,0,0,.25);
}
p, h1, h2, h3, pre {
padding: .8em .4em;
line-height: 1.25em;
text-shadow: 0 2px 0 rgba(0,0,0,.25);
}
pre {
font-size: .75em;
overflow: scroll;
}
hr {
border-style: solid;
border-width: calc(var(--border-width) / 2);
/* border-radius: var(--border-radius); */
max-width: var(--content-width);
margin: calc(var(--border-width) * 2);
opacity: .35;
}
blockquote, pre {
position: relative;
z-index: 1;
}
blockquote:before {
content: ' ';
position: absolute;
top: 0;
left: 0;
z-index: -1;
width: 100%;
height: 100%;
background-color: var(--color-black);
opacity: .35;
}
pre {
background-color: rgba(0,0,0,.35);
}
.text-center {
text-align: center;
}
img, iframe {
max-width: 100%;
}
.highlight {
color: var(--color-yellow);
}
.highlight-green {
color: var(--color-light-green);
}
/* Buttons */
.btn {
display: inline-block;
padding: .75em 1em;
font-family: "Press Start 2P", "Helvetica Neue", helvetica, arial, sans-serif;
font-size: 15px;
text-align: left;
text-decoration: none;
text-shadow: none;
border: none;
background: var(--color-white);
color: var(--color-black);
}
.btn:hover {
background: var(--color-yellow);
}
.btn span {
float: right;
padding-left: 1ch;
margin-top: -2px;
}
span.arrow {
margin-top: -4px;
font-size: 18px;
}
span.arrow:after {
content: '▶';
}
/* Outside of the box layout */
.content {
max-width: var(--content-width);
margin: 0 auto calc(var(--border-width) * 4) auto;
padding: 0 var(--border-width);
}
/* Box layout */
.box {
position: relative;
display: flex;
max-width: var(--content-width);
flex-direction: column;
margin: 0 auto calc(var(--border-width) * 4) auto;
padding: 0;
background: transparent;
border: var(--border-width) solid var(--color-gray);
border-radius: var(--border-radius);
}
.box p, .box h1, .box h2, .box h3, .box pre {
padding: .8em .8em;
}
.box-layout-sidebar {
flex-direction: row;
}
.box-header {
display: inline-block;
position: absolute;
top: 0;
left: 0;
padding:
calc(1em - var(--border-width))
1em
1em
calc(1em - var(--border-width))!important;
background: var(--color-gray);
font-size: 15px;
}
.box-content {
margin-top: 2em;
}
.box-footer {
text-align: right;
}
.box-footer {
margin-right: var(--border-width-negative);
}
.box-layout-default .box-footer {
display: inline-flex;
align-self: flex-end;
}
.box-layout-sidebar .box-footer {
background: var(--color-gray);
color: var(--color-white);
min-width: 240px;
}
.box-layout-sidebar .box-footer .btn {
display: block;
}
.box-layout-sidebar .box-footer .btn:first-of-type {
border-top-width: 0px;
}
.box-layout-fullwidth .box-footer {
display: flex;
flex-wrap: wrap;
align-content: stretch;
margin-left: var(--border-width-negative);
text-align: right;
background: var(--color-gray);
}
.box-layout-fullwidth .box-footer .btn {
display: inline-flex;
flex-grow: 1;
}
.box-layout-fullwidth .box-footer .btn span {
padding-left: 1ch;
margin-left: auto;
}
.box .box-footer .btn {
border-top: var(--border-width) solid var(--color-gray);
border-left: var(--border-width) solid var(--color-gray);
}
/* Mobile box layout */
@media only screen and (max-width: 600px) {
.box-layout-sidebar {
flex-direction: column;
}
.box-layout-default .box-footer {
width: calc(100% + var(--border-width) * 2);
}
.box-layout-sidebar .box-footer .btn:first-of-type {
border-top-width: var(--border-width);
}
.box .box-footer {
display: block;
margin-left: var(--border-width-negative);
}
.box .box-footer .btn {
display: block;
position: relative;
padding-right: 2.5em;
}
.box .box-footer .btn span {
position: absolute;
top: 0;
padding: .75em 0;
right: 1em;
}
}
/* Box color variants */
.box-gray, .box-gray .box-footer .btn {
border-color: var(--color-gray);
}
.box-gray .box-header, .box-gray.box-layout-sidebar .box-footer,
.box-gray.box-layout-fullwidth .box-footer,
.box-gray blockquote:before {
background-color: var(--color-gray);
}
.box-gray .arrow {
color: var(--color-gray);
}
.box-red, .box-red .box-footer .btn {
border-color: var(--color-red);
}
.box-red .box-header, .box-red.box-layout-sidebar .box-footer,
.box-red.box-layout-fullwidth .box-footer,
.box-red blockquote:before {
background-color: var(--color-red);
}
.box-red .arrow {
color: var(--color-red);
}
.box-purple, .box-purple .box-footer .btn {
border-color: var(--color-purple);
}
.box-purple .box-header, .box-purple.box-layout-sidebar .box-footer,
.box-purple.box-layout-fullwidth .box-footer,
.box-purple blockquote:before {
background-color: var(--color-purple);
}
.box-purple .arrow {
color: var(--color-purple);
}