cupper-hugo-theme/themes/inclusive-pattern-docs/static/css/styles.css

554 lines
6.9 KiB
CSS
Raw Normal View History

2017-06-09 15:27:09 +02:00
/*
2017-06-09 15:27:09 +02:00
Colors:
Blue color = #38608F
Dark blue color = #153B62
Gold color = #FCB316
Grey color = #707174
Red color = #C83737
2017-06-19 11:40:21 +02:00
Green color = #217844
2017-06-09 15:27:09 +02:00
*/
*, *::before, *::after {
font-family: inherit;
color: inherit;
margin: 0;
padding: 0;
box-sizing: border-box;
}
html {
2017-06-09 15:27:09 +02:00
font-size: calc(1em + 0.33vw);
font-family: PT Sans, sans-serif;
line-height: 1.5;
2017-06-09 15:27:09 +02:00
color: #111;
}
* + * {
2017-06-09 15:27:09 +02:00
margin-top: 2.25rem;
}
br,
dt,
dd,
th,
td,
option,
[hidden] + *,
2017-06-15 10:41:44 +02:00
li + li,
body,
.main-and-footer {
margin-top: 0;
}
p + p {
margin-top: 0.75rem;
}
a {
text-decoration: none;
border-bottom: 1px solid;
}
img {
max-width: 100%;
}
2017-06-19 11:40:21 +02:00
:focus:not([tabindex="-1"]),
[data-expands]:focus svg,
.patterns a:focus span {
2017-06-15 10:41:44 +02:00
outline: 3px solid #FCB316;
outline-offset: 2px;
}
/* fix for IE :( */
div:not([tabindex]):focus {
outline: none;
}
h1, h2, h3, h4 {
2017-06-09 15:27:09 +02:00
font-family: Miriam Libre, serif;
line-height: 1.125;
}
h1 {
2017-06-12 13:05:48 +02:00
font-size: 2rem;
}
h2 {
2017-06-09 15:27:09 +02:00
font-size: 1.66rem;
}
h3 {
2017-06-09 15:27:09 +02:00
font-size: 1.25rem;
}
h4 {
font-size: 1rem;
font-family: PT Sans, sans-serif;
}
kbd {
line-height: 1;
2017-06-09 15:27:09 +02:00
font-size: 0.66rem;
2017-06-19 11:40:21 +02:00
padding: 0.1rem 0.33rem;
border-radius: 0.25rem;
2017-06-09 15:27:09 +02:00
border: 2px solid;
box-shadow: 0.125rem 0.125rem 0 #111;
2017-06-19 11:40:21 +02:00
vertical-align: 0.33em;
}
code {
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
2017-06-09 15:27:09 +02:00
font-size: 0.85rem;
}
2017-06-15 10:41:44 +02:00
/* Lists */
2017-06-12 13:05:48 +02:00
main ul {
margin-left: 2.25rem;
}
2017-06-19 11:40:21 +02:00
main li + li {
margin-top: 0.5rem;
}
2017-06-12 13:05:48 +02:00
main ul ul {
margin-top: 0;
}
2017-06-09 15:27:09 +02:00
/* Buttons */
button {
font-size: inherit;
font-family: inherit;
font-weight: inherit;
}
2017-06-09 15:27:09 +02:00
/* Tables */
table {
text-align: left;
table-layout: fixed;
width: 100%;
border-collapse: collapse;
}
th, td {
border: 2px solid;
padding: 0.5rem;
line-height: 1;
margin: 0;
}
caption {
font-size: 1.125rem;
padding-bottom: 0.25rem;
font-style: italic;
}
th:empty {
border: 0;
}
2017-06-09 15:27:09 +02:00
2017-06-15 10:41:44 +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-06-19 11:40:21 +02:00
margin-top: 0.25rem;
2017-06-15 10:41:44 +02:00
}
.main-and-footer {
margin-left: 15rem;
}
.main-and-footer > div {
max-width: 40rem;
margin: 0 auto;
padding: 2.25rem;
}
2017-06-19 11:40:21 +02:00
/* Patterns navigation */
.patterns {
overflow: auto;
margin-top: 1rem;
}
.patterns * {
margin-top: 0;
}
.patterns h3 {
font-size: 1rem;
}
.patterns li {
line-height: 1.125;
margin-top: 0.75rem;
list-style: none;
}
.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;
}
/* 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 {
height: 1em;
width: auto;
vertical-align: middle;
}
.tags strong {
margin-right: 0.25rem;
}
.tags li {
white-space: nowrap;
margin: 0 0.25rem 0 0;
}
2017-06-09 15:27:09 +02:00
/* Notes and warnings */
.note {
2017-06-19 11:40:21 +02:00
border-left: 0.5rem solid;
2017-06-09 15:27:09 +02:00
font-size: 0.85rem;
}
.note > div {
margin-left: 0.75rem;
}
.note > div > img:first-child {
height: 1.5rem;
}
.note > div > :first-child + * {
margin-top: 0;
}
2017-06-19 11:40:21 +02:00
/* 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;
}
2017-06-15 10:41:44 +02:00
/* Figures */
figure {
text-align: center;
}
figcaption {
font-size: 0.85rem;
font-style: italic;
margin-top: 0.75rem;
}
main {
2017-06-19 11:40:21 +02:00
display: block;
2017-06-15 10:41:44 +02:00
counter-reset: fig;
}
figcaption::before {
counter-increment: fig;
content: 'Figure ' counter(fig) ':';
font-weight: bold;
}
2017-06-09 15:27:09 +02:00
/* Code blocks */
pre[class*=language-] {
2017-06-19 11:40:21 +02:00
padding: 0 !important;
background: none;
2017-06-09 15:27:09 +02:00
margin-top: 2.25rem;
2017-06-19 11:40:21 +02:00
margin-bottom: 0;
overflow-y: hidden;
overflow-x: auto;
2017-06-09 15:27:09 +02:00
}
pre[class*=language-][data-line] {
2017-06-19 11:40:21 +02:00
padding: 1em 0 0 2.25rem;
2017-06-09 15:27:09 +02:00
}
pre[class*=language-] code * {
margin-top: 0 !important;
}
[data-codeblock-shortcode] {
display: block;
margin-top: -1rem;
}
2017-06-19 11:40:21 +02:00
*:not(pre) > code {
background: #f7f7f7;
padding: 0.125rem 0.25rem;
white-space: nowrap;
}
2017-06-09 15:27:09 +02:00
.token.property,
.token.tag,
.token.boolean,
.token.number,
.token.constant,
.token.symbol,
.token.deleted {
2017-06-19 11:40:21 +02:00
color: #888;
2017-06-09 15:27:09 +02:00
}
.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin,
.token.inserted {
2017-06-19 11:40:21 +02:00
color: #111;
2017-06-09 15:27:09 +02:00
}
.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.style .token.string {
2017-06-19 11:40:21 +02:00
color: #333;
background: none;
2017-06-09 15:27:09 +02:00
}
.token.atrule,
.token.attr-value,
.token.keyword {
2017-06-19 11:40:21 +02:00
color: #666;
font-weight: bold;
2017-06-09 15:27:09 +02:00
}
.token.function {
2017-06-19 11:40:21 +02:00
color: #ccc;
2017-06-09 15:27:09 +02:00
}
.line-numbers code {
2017-06-19 11:40:21 +02:00
padding-left: 1.5rem;
2017-06-09 15:27:09 +02:00
margin-top: -1rem;
}
.line-numbers {
padding-bottom: 2.25rem !important;
}
.line-numbers .line-numbers-rows {
margin-left: 2.25rem;
top: 1.25rem;
2017-06-15 10:41:44 +02:00
border-right-style: dashed
color: #111;
}
.line-numbers-rows > span:before {
color: inherit;
2017-06-09 15:27:09 +02:00
}
/* Expandable sections */
2017-06-15 10:41:44 +02:00
.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;
}
2017-06-09 15:27:09 +02:00
[data-expands] {
text-align: left;
border: 0;
background: none;
width: 100%;
padding: 0;
margin: 0;
2017-06-15 10:41:44 +02:00
display: flex;
align-items: center;
justify-content: space-between;
cursor: pointer;
2017-06-09 15:27:09 +02:00
}
[data-expands] svg {
2017-06-15 10:41:44 +02:00
margin-top: 0;
2017-06-09 15:27:09 +02:00
width: 1em;
height: 1em;
}
[data-expands][aria-expanded="true"] svg .up-strut {
display: none;
}
2017-06-15 10:41:44 +02:00
[data-expands]:focus {
outline: none;
}
p:empty {
display: none;
}
/* 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;
}
2017-06-19 11:40:21 +02:00
/* SVG icons */
a svg {
height: 0.75em;
width: auto;
margin-right: 0.125rem;
}
a .bookmark {
width: 0.75em;
}
/* cross references */
.pattern-link {
font-weight: bold;
}
2017-06-20 10:53:54 +02:00
/* inline demos */
[id^="demo-"] {
all: initial;
}
[id^="demo-"] * {
all: initial;
}