|
| 1 | +// Imported last, so this is where rules go rather than variables. |
| 2 | + |
| 3 | + |
| 4 | +// A rule under the masthead rather than a hard edge against the sidebar. |
| 5 | +.site-header, |
| 6 | +.site-nav, |
| 7 | +.side-bar { |
| 8 | + border-color: $border-color; |
| 9 | +} |
| 10 | + |
| 11 | +// The current page gets a bar in the accent, not just a bolder weight. A |
| 12 | +// terminal library's docs can afford to say where you are. |
| 13 | +.site-nav .nav-list .nav-list-item .nav-list-link.active { |
| 14 | + box-shadow: inset 2px 0 0 0 $link-color; |
| 15 | + background-color: $feedback-color; |
| 16 | +} |
| 17 | + |
| 18 | +// Code is the point of this site, so it gets a real container: the surface |
| 19 | +// tone behind it, one rule around it, and no rounded corners fighting the |
| 20 | +// box-drawing characters inside. |
| 21 | +div.highlighter-rouge, |
| 22 | +figure.highlight, |
| 23 | +pre.highlight { |
| 24 | + border-radius: $border-radius; |
| 25 | +} |
| 26 | +div.highlighter-rouge div.highlight { |
| 27 | + border: 1px solid rgba($border-color, 0.4); |
| 28 | + background-color: rgba($code-background-color, 0.1); |
| 29 | +} |
| 30 | + |
| 31 | +code.language-plaintext.highlighter-rouge { |
| 32 | + border: 1px solid $border-color; |
| 33 | + padding: 0.12em 0.32em; |
| 34 | +} |
| 35 | + |
| 36 | +// Tables carry a lot of this documentation - the token lists, the scope |
| 37 | +// tables, the capability matrix - so the header needs to separate. |
| 38 | +.main-content table thead th { |
| 39 | + background-color: $feedback-color; |
| 40 | + border-bottom: 1px solid $border-color; |
| 41 | +} |
| 42 | + |
| 43 | +.main-content table td, |
| 44 | +.main-content table th { |
| 45 | + border-color: $border-color; |
| 46 | +} |
| 47 | + |
| 48 | +// Headings a little tighter than the default, which is set for prose that is |
| 49 | +// mostly paragraphs rather than mostly reference. |
| 50 | +.main-content h1, |
| 51 | +.main-content h2, |
| 52 | +.main-content h3 { |
| 53 | + letter-spacing: -0.01em; |
| 54 | +} |
| 55 | + |
| 56 | +// Blockquotes read as asides here (the "not a terminal adapter" notes), so |
| 57 | +// they get the accent rather than a grey bar. |
| 58 | +.main-content blockquote { |
| 59 | + border-left-width: 1px; |
| 60 | +} |
| 61 | + |
| 62 | +p.warning, blockquote.warning { |
| 63 | + border-left: 1px solid $yellow-000; |
| 64 | + border-color: rgba($yellow-000, 0.3); |
| 65 | + background-color: rgba($yellow-000, 0.1); |
| 66 | +} |
| 67 | +// The scheme toggle, at the foot of the sidebar. |
| 68 | +.theme-toggle { |
| 69 | + display: flex; |
| 70 | + align-items: center; |
| 71 | + gap: 0.5rem; |
| 72 | + width: 100%; |
| 73 | + padding: 0.4rem 0.75rem; |
| 74 | + border: 1px solid $border-color; |
| 75 | + border-radius: $border-radius; |
| 76 | + background-color: transparent; |
| 77 | + color: $search-result-preview-color; |
| 78 | + font-size: 0.72rem; |
| 79 | + font-family: $mono-font-family; |
| 80 | + letter-spacing: 0.02em; |
| 81 | + cursor: pointer; |
| 82 | +} |
| 83 | + |
| 84 | +.theme-toggle:hover { |
| 85 | + background-color: $feedback-color; |
| 86 | + color: $body-heading-color; |
| 87 | +} |
| 88 | + |
| 89 | +.theme-toggle-dot { |
| 90 | + width: 0.55rem; |
| 91 | + height: 0.55rem; |
| 92 | + border-radius: 50%; |
| 93 | + border: 1px solid $link-color; |
| 94 | + background-color: transparent; |
| 95 | +} |
| 96 | + |
| 97 | +// Filled when the reader has chosen; hollow while it follows the browser - |
| 98 | +// the same rest/selected distinction the component catalog uses. |
| 99 | +:root[data-theme-choice="light"] .theme-toggle-dot, |
| 100 | +:root[data-theme-choice="dark"] .theme-toggle-dot { |
| 101 | + background-color: $link-color; |
| 102 | +} |
0 commit comments