cupper-hugo-theme/docs/css/styles.css

886 lines
12 KiB
CSS
Raw Normal View History

2017-07-11 18:23:19 +02:00
/* fonts */
@font-face {
font-family: 'PT Sans';
src: url('fonts/pt_sans-web-bold.woff2') format('woff2'),
url('fonts/pt_sans-web-bold.woff') format('woff');
font-weight: bold;
font-style: normal;
}
@font-face {
font-family: 'PT Sans';
src: url('fonts/pt_sans-web-italic.woff2') format('woff2'),
url('fonts/pt_sans-web-italic.woff') format('woff');
font-weight: normal;
font-style: italic;
}
@font-face {
font-family: 'PT Sans';
src: url('fonts/pt_sans-web-regular.woff2') format('woff2'),
url('fonts/pt_sans-web-regular.woff') format('woff');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'Miriam Libre';
src: url('fonts/miriamlibre-bold.woff2') format('woff2'),
url('fonts/miriamlibre-bold.woff') format('woff');
font-weight: bold;
font-style: normal;
}
2017-07-03 13:43:14 +02:00
*, *::before, *::after {
font-family: inherit;
color: inherit;
margin: 0;
padding: 0;
box-sizing: border-box;
}
html {
font-size: calc(1em + 0.33vw);
font-family: PT Sans, sans-serif;
line-height: 1.5;
color: #111;
}
* + * {
margin-top: 2.25rem;
}
br,
dt,
dd,
th,
td,
option,
[hidden] + *,
li + li,
body,
.main-and-footer {
margin-top: 0;
}
p + p {
margin-top: 0.75rem;
}
a {
text-decoration: none;
border-bottom: 1px solid;
}
2017-07-15 10:28:17 +02:00
abbr {
text-decoration: none;
cursor: help;
border-bottom: 1px dashed;
}
2017-07-03 13:43:14 +02:00
img {
max-width: 100%;
}
p img {
2017-07-03 20:57:38 +02:00
margin: 0.75rem 0;
2017-07-03 13:43:14 +02:00
}
figure p img {
2017-07-04 12:46:56 +02:00
margin: 0;
2017-07-03 13:43:14 +02:00
}
:focus:not([tabindex="-1"]),
[data-expands]:focus svg,
.patterns a:focus .text {
outline: 3px solid #ccc;
outline-offset: 2px;
}
/* fix for IE :( */
div:not([tabindex]):focus {
outline: none;
}
/* skip link */
[href="#main"] {
display: block;
width: 100%;
padding: 0.75rem;
color: #fff;
background: #000;
position: absolute;
top: -3rem;
text-align: center;
z-index: 1;
}
[href="#main"]:focus {
top: 0;
outline: none;
}
/* text styles */
h1, h2, h3, h4 {
font-family: Miriam Libre, serif;
line-height: 1.125;
}
h1 {
font-size: 2rem;
}
h2 {
font-size: 1.66rem;
}
h3 {
font-size: 1.25rem;
}
2017-07-14 18:26:35 +02:00
h4, h5 {
2017-07-03 13:43:14 +02:00
font-size: 1rem;
font-family: PT Sans, sans-serif;
}
2017-07-14 18:26:35 +02:00
h5 {
font-size: 0.85rem;
text-transform: uppercase;
}
2017-07-03 13:43:14 +02:00
kbd {
line-height: 1;
font-size: 0.66rem;
padding: 0.1rem 0.33rem;
border-radius: 0.25rem;
border: 2px solid;
box-shadow: 0.125rem 0.125rem 0 #111;
vertical-align: 0.33em;
}
2017-07-16 17:49:20 +02:00
pre, .file-tree {
2017-07-03 13:43:14 +02:00
overflow-x: auto;
padding: 1.5rem;
border: 1px solid;
}
code {
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
font-size: 0.85em;
}
.cmd {
padding: 0.75rem;
background: #111;
}
.cmd code {
color: #fff;
white-space: nowrap;
}
.cmd code::before {
content: '$';
font-weight: bold;
padding-right: 0.25em;
}
/* Lists */
2017-07-14 18:26:35 +02:00
main ul, main ol {
2017-07-03 13:43:14 +02:00
margin-left: 2.25rem;
}
main li + li {
margin-top: 0.5rem;
}
main ul ul {
margin-top: 0;
}
/* Buttons */
button {
font-size: 1.25rem;
font-family: inherit;
font-weight: inherit;
background: #111;
color: #fff;
padding: 0.75rem;
border: 0;
}
/* Tables */
table {
text-align: left;
table-layout: fixed;
width: 100%;
border-collapse: collapse;
}
th, td {
border: 2px solid;
padding: 0.5rem;
2017-07-08 13:21:43 +02:00
line-height: 1.25;
2017-07-03 13:43:14 +02:00
margin: 0;
}
2017-07-08 13:21:43 +02:00
th {
font-weight: bold;
2017-07-03 13:43:14 +02:00
}
th:empty {
border: 0;
}
2017-07-08 13:21:43 +02:00
/* Tested using... table */
.tested {
text-align: center;
}
.tested td {
vertical-align: top;
2017-07-16 19:13:47 +02:00
overflow: hidden;
2017-07-08 13:21:43 +02:00
}
.tested th {
background-color: #111;
border-color: #111;
color: #fff;
}
.tested img {
max-width: 3rem;
}
.tested span {
display: block;
margin: 0;
}
.tested .additional {
font-size: 0.85rem;
}
caption {
font-size: 1.125rem;
padding-bottom: 0.25rem;
font-style: italic;
}
2017-07-03 13:43:14 +02:00
/* Page structure */
.wrapper {
position: relative;
margin-top: 0;
}
.intro-and-nav {
font-size: 0.85rem;
width: 15rem;
height: 100vh;
position: fixed;
top: 0;
left: 0;
border-right: 2px solid;
}
.intro-and-nav > div {
padding: 2.25rem;
display: flex;
flex-direction: column;
height: 100%;
}
.logo {
border: 0;
}
.library-desc {
font-style: italic;
2017-07-17 17:46:15 +02:00
margin-top: 0.5rem;
2017-07-03 13:43:14 +02:00
margin-left: auto;
margin-right: auto;
max-width: 30rem;
}
.main-and-footer {
margin-left: 15rem;
}
.main-and-footer > div {
max-width: 40rem;
margin: 0 auto;
padding: 2.25rem;
}
[role="contentinfo"] {
font-size: 0.85rem;
margin-top: 4rem;
text-align: center;
}
/* Patterns navigation */
.patterns {
overflow: auto;
2017-07-17 17:46:15 +02:00
margin-top: 1.5rem;
2017-07-03 13:43:14 +02:00
}
.patterns * {
margin-top: 0;
}
.patterns h3 {
font-size: 1rem;
}
2017-07-17 17:46:15 +02:00
.patterns h3 + ul {
margin-top: 0.75rem;
}
2017-07-03 13:43:14 +02:00
.patterns li {
line-height: 1.125;
list-style: none;
}
2017-07-17 17:46:15 +02:00
.patterns li + li {
margin-top: 0.75rem;
}
2017-07-03 13:43:14 +02:00
.patterns ul ul {
margin-left: 0.75rem;
}
.pattern a {
border: 0;
display: flex;
flex-wrap: nowrap;
align-items: baseline;
font-weight: bold;
}
.pattern a:focus {
outline: none;
}
.pattern a:focus span {
outline:
}
.pattern span {
margin-left: 0.125rem;
}
.pattern [aria-current] span {
text-decoration: underline;
text-decoration-skip: ink;
}
/* menu button */
#menu-button {
display: none;
width: 100%;
text-align: center;
}
#menu-button:focus {
outline: none;
box-shadow: inset 0 0 0 0.25rem #ccc;
}
2017-07-14 18:26:35 +02:00
/* Tables of contents */
.toc {
font-size: 0.85rem;
border: 1px solid;
padding: 1.5rem;
}
.toc h2 {
font-size: 1rem;
}
.toc ol {
margin-left: 0.75rem;
margin-top: 0.5rem;
}
2017-07-03 13:43:14 +02:00
/* Pattern lists */
.patterns-list {
list-style: none;
margin-left: 0;
}
.patterns-list h2 {
font-size: 1.25rem;
}
.patterns-list li + li {
margin-top: 1rem;
padding-top: 1rem;
border-top: 2px solid;
}
.patterns-list a {
border: 0;
}
/* Tags */
.tags {
margin-top: 0;
font-size: 0.85rem;
}
.tags * {
display: inline;
margin: 0;
}
.tag-icon {
height: 1em;
width: auto;
vertical-align: middle;
}
.tags strong {
margin-right: 0.25rem;
}
.tags li {
white-space: nowrap;
margin: 0 0.25rem 0 0;
}
/* Notes and warnings */
.note {
border-left: 0.5rem solid;
font-size: 0.85rem;
}
2017-07-23 13:16:54 +02:00
.note svg {
height: 2.25rem;
width: auto;
}
2017-07-03 13:43:14 +02:00
.note > div {
margin-left: 0.75rem;
}
.note > div > img:first-child {
height: 1.5rem;
}
.note > div > :first-child + * {
margin-top: 0;
}
.note.warning {
border-left: 0;
background-image: url(images/stripe.svg);
background-size: 0.5rem auto;
background-repeat: repeat-y;
}
.note.warning > div {
margin-left: 1.25rem;
}
/* Tick lists */
.ticks li {
list-style: none;
position: relative;
}
.ticks li::before {
content: '';
display: inline-block;
width: 1rem;
height: 1rem;
margin-right: 0.25rem;
background-image: url(images/icon-tick.svg);
background-size: 100% auto;
position: absolute;
left: -1.25rem;
top: 0.25rem;
}
/* Figures */
figure {
text-align: center;
}
figcaption {
font-size: 0.85rem;
font-style: italic;
2017-07-04 12:46:56 +02:00
margin-top: 0.5rem;
2017-07-03 13:43:14 +02:00
}
main {
display: block;
counter-reset: fig;
min-height: 100vh;
}
figcaption::before {
counter-increment: fig;
2017-07-11 17:24:52 +02:00
content: 'Figure ' counter(fig) ':\0020';
2017-07-03 13:43:14 +02:00
font-weight: bold;
}
/* Code blocks */
pre[class*=language-] {
background: none;
margin-top: 2.25rem;
margin-bottom: 0;
overflow-y: hidden;
overflow-x: auto;
}
pre[class*=language-][data-line] {
padding: 1em 0 0 2.25rem;
}
pre[class*=language-] code * {
margin-top: 0 !important;
}
[data-codeblock-shortcode] {
display: block;
margin-top: -1rem;
}
*:not(pre) > code {
white-space: nowrap;
}
.token.property,
.token.tag,
.token.boolean,
.token.number,
.token.constant,
.token.symbol,
.token.deleted {
color: #888;
}
.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin,
.token.inserted {
color: #111;
}
.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.style .token.string {
color: #333;
background: none;
}
.token.atrule,
.token.attr-value,
.token.keyword {
color: #666;
}
.token.function {
color: #888;
}
.line-numbers code {
padding-left: 3rem;
margin-top: -1rem;
overflow-x: auto;
overflow-y: hidden;
}
.line-numbers {
padding: 1.5rem !important;
}
.line-numbers .line-numbers-rows {
margin-left: 2.25rem;
left: -3.5em;
top: 1.25rem;
color: #111;
border-color: #111;
}
.line-numbers-rows > span:before {
color: inherit;
}
2017-07-16 17:49:20 +02:00
/* file tree lists */
.file-tree ul {
font-family: courier;
margin: 0;
padding-left: 3rem;
list-style: none;
line-height: 1.25;
position: relative;
overflow: hidden;
}
2017-07-17 00:03:03 +02:00
.file-tree li:not(:last-child) > ul::before {
2017-07-16 20:58:18 +02:00
content: '\2502\0020\2502\0020\2502\0020\2502\0020\2502\0020\2502\0020\2502\0020\2502\0020\2502\0020\2502\0020\2502\0020\2502\0020\2502\0020\2502\0020\2502\0020\2502\0020\2502\0020\2502\0020\2502\0020\2502\0020\2502\0020\2502\0020\2502\0020\2502\0020\2502\0020\2502\0020\2502\0020\2502\0020\2502\0020\2502\0020\2502\0020\2502\0020\2502\0020\2502\0020\2502\0020\2502\0020\2502\0020\2502\0020\2502\0020\2502\0020';
2017-07-16 17:49:20 +02:00
position: absolute;
left: 0;
top: 0;
bottom: 0;
width: 1em;
}
.file-tree > ul {
margin: 0;
padding: 0;
}
.file-tree li {
background: #fff;
position: relative;
}
.file-tree li + li {
margin-top: 0;
}
.file-tree li::before {
content: '\251C\2500\2500\0020';
}
.file-tree li:last-child::before {
content: '\2514\2500\2500\0020';
}
2017-07-03 13:43:14 +02:00
/* Expandable sections */
.expandable-section {
border-top: 1px solid;
border-bottom: 1px solid;
padding: 0.75rem 0;
}
[id^="expandable-"] {
margin: 0;
padding: 1.5rem 0 0.75rem;
}
.expandable-section + .expandable-section {
margin-top: 0;
border-top: 0;
}
[data-expands] {
text-align: left;
color: #111;
border: 0;
background: none;
width: 100%;
padding: 0;
margin: 0;
display: flex;
align-items: center;
justify-content: space-between;
cursor: pointer;
}
[data-expands] svg {
margin-top: 0;
width: 1em;
height: 1em;
}
[data-expands][aria-expanded="true"] svg .up-strut {
display: none;
}
[data-expands]:focus {
outline: none;
}
p:empty {
display: none;
}
*:not(p) + p:empty + p {
margin-top: 2.25rem;
}
/* WCAG and principles */
.wcag ul li {
font-size: 0.85em;
}
.principles p {
font-size: 0.85rem;
margin-top: 0.75rem;
}
.principles.with-desc > li + li,
.wcag.with-desc > li + li {
border-top: 1px solid;
margin-top: 0.75rem;
padding-top: 0.75rem;
}
/* Site errors */
.site-error {
padding: 1.5rem;
background: #efefef;
}
.site-error strong {
color: #C83737;
}
/* SVG icons */
2017-07-13 20:05:53 +02:00
a svg, button svg {
2017-07-03 13:43:14 +02:00
height: 0.75em;
width: auto;
2017-07-17 17:46:15 +02:00
margin-right: 0.25em;
2017-07-03 13:43:14 +02:00
}
2017-07-04 16:00:26 +02:00
h1 svg {
vertical-align: -0.5rem;
}
2017-07-03 13:43:14 +02:00
/* color palettes */
.colors {
display: flex;
height: 5rem;
margin: -0.25rem;
list-style: none;
flex-wrap: nowrap;
}
.colors li {
margin: 0.25rem;
flex: 1 0 auto;
position: relative;
}
.colors span {
line-height: 1;
background-color: #111;
color: #fff;
font-size: 0.75rem;
padding: 0.25rem;
position: absolute;
bottom: 0.25rem;
right: 0.25rem;
}
/* cross references */
.pattern-link {
font-weight: bold;
}
/* inline demos */
[id^="demo-"] {
all: initial;
2017-07-11 17:24:52 +02:00
display: block;
2017-07-03 13:43:14 +02:00
}
@media (max-width: 45em) {
[role="banner"] {
position: static;
width: auto;
height: auto;
}
.intro {
text-align: center;
}
.intro-and-nav > div {
padding: 1.5rem;
}
.logo img {
max-width: 15rem;
}
.main-and-footer {
margin: 0;
}
.patterns h3 {
font-size: 1.125rem;
border-top: 4px solid;
border-bottom: 4px solid;
padding: 0.75rem 0;
}
2017-07-17 17:46:15 +02:00
.patterns li:not(.pattern) {
margin-top: 0;
}
2017-07-03 13:43:14 +02:00
.patterns ul ul {
margin: 0;
}
.patterns li {
margin-top: 0;
}
.pattern {
font-size: 1rem;
}
.pattern a {
padding: 0.75rem 0;
}
.pattern + .pattern {
border-top: 1px solid;
2017-07-17 17:46:15 +02:00
margin-top: 0;
2017-07-03 13:43:14 +02:00
}
#menu-button {
display: block;
}
#patterns-list {
display: none;
}
[aria-expanded="true"] + #patterns-list {
display: block;
}
2017-07-16 19:13:47 +02:00
.tested th, .tested td {
display: block;
}
.tested td + td {
border-top: 0;
}
2017-07-03 13:43:14 +02:00
}