|
1 | | -/** Fix the font weight (300 for normal, 400 for slightly bold) **/ |
2 | | - |
3 | | -div.page, h1, h2, h3, h4, h5, h6, .sidebar-tree .current-page>.reference, button, input, optgroup, select, textarea, th.head { |
4 | | - font-weight: 300 |
| 1 | +/** |
| 2 | + Ubuntu variable font definitions. |
| 3 | + Based on https://github.com/canonical/vanilla-framework/blob/main/scss/_base_fontfaces.scss |
| 4 | +
|
| 5 | + When font files are updated in Vanilla, the links to font files will need to be updated here as well. |
| 6 | +*/ |
| 7 | + |
| 8 | +/* default font set */ |
| 9 | +@font-face { |
| 10 | + font-family: 'Ubuntu variable'; |
| 11 | + font-stretch: 100%; /* min and max value for the width axis, expressed as percentage */ |
| 12 | + font-style: normal; |
| 13 | + font-weight: 100 800; /* min and max value for the weight axis */ |
| 14 | + src: url('https://assets.ubuntu.com/v1/f1ea362b-Ubuntu%5Bwdth,wght%5D-latin-v0.896a.woff2') format('woff2-variations'); |
| 15 | +} |
| 16 | + |
| 17 | +@font-face { |
| 18 | + font-family: 'Ubuntu variable'; |
| 19 | + font-stretch: 100%; /* min and max value for the width axis, expressed as percentage */ |
| 20 | + font-style: italic; |
| 21 | + font-weight: 100 800; /* min and max value for the weight axis */ |
| 22 | + src: url('https://assets.ubuntu.com/v1/90b59210-Ubuntu-Italic%5Bwdth,wght%5D-latin-v0.896a.woff2') format('woff2-variations'); |
| 23 | +} |
| 24 | + |
| 25 | +@font-face { |
| 26 | + font-family: 'Ubuntu Mono variable'; |
| 27 | + font-style: normal; |
| 28 | + font-weight: 100 800; /* min and max value for the weight axis */ |
| 29 | + src: url('https://assets.ubuntu.com/v1/d5fc1819-UbuntuMono%5Bwght%5D-latin-v0.869.woff2') format('woff2-variations'); |
| 30 | +} |
| 31 | + |
| 32 | +/* cyrillic-ext */ |
| 33 | +@font-face { |
| 34 | + font-family: 'Ubuntu variable'; |
| 35 | + font-stretch: 100%; /* min and max value for the width axis, expressed as percentage */ |
| 36 | + font-style: normal; |
| 37 | + font-weight: 100 800; /* min and max value for the weight axis */ |
| 38 | + src: url('https://assets.ubuntu.com/v1/77cd6650-Ubuntu%5Bwdth,wght%5D-cyrillic-extended-v0.896a.woff2') format('woff2-variations'); |
| 39 | + unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F; |
| 40 | +} |
| 41 | + |
| 42 | +/* cyrillic */ |
| 43 | +@font-face { |
| 44 | + font-family: 'Ubuntu variable'; |
| 45 | + font-stretch: 100%; /* min and max value for the width axis, expressed as percentage */ |
| 46 | + font-style: normal; |
| 47 | + font-weight: 100 800; /* min and max value for the weight axis */ |
| 48 | + src: url('https://assets.ubuntu.com/v1/2702fce5-Ubuntu%5Bwdth,wght%5D-cyrillic-v0.896a.woff2') format('woff2-variations'); |
| 49 | + unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; |
| 50 | +} |
| 51 | + |
| 52 | +/* greek-ext */ |
| 53 | +@font-face { |
| 54 | + font-family: 'Ubuntu variable'; |
| 55 | + font-stretch: 100%; /* min and max value for the width axis, expressed as percentage */ |
| 56 | + font-style: normal; |
| 57 | + font-weight: 100 800; /* min and max value for the weight axis */ |
| 58 | + src: url('https://assets.ubuntu.com/v1/5c108b7d-Ubuntu%5Bwdth,wght%5D-greek-extended-v0.896a.woff2') format('woff2-variations'); |
| 59 | + unicode-range: U+1F00-1FFF; |
| 60 | +} |
| 61 | + |
| 62 | +/* greek */ |
| 63 | +@font-face { |
| 64 | + font-family: 'Ubuntu variable'; |
| 65 | + font-stretch: 100%; /* min and max value for the width axis, expressed as percentage */ |
| 66 | + font-style: normal; |
| 67 | + font-weight: 100 800; /* min and max value for the weight axis */ |
| 68 | + src: url('https://assets.ubuntu.com/v1/0a14c405-Ubuntu%5Bwdth,wght%5D-greek-v0.896a.woff2') format('woff2-variations'); |
| 69 | + unicode-range: U+0370-03FF; |
| 70 | +} |
| 71 | + |
| 72 | +/* latin-ext */ |
| 73 | +@font-face { |
| 74 | + font-family: 'Ubuntu variable'; |
| 75 | + font-stretch: 100%; /* min and max value for the width axis, expressed as percentage */ |
| 76 | + font-style: normal; |
| 77 | + font-weight: 100 800; /* min and max value for the weight axis */ |
| 78 | + src: url('https://assets.ubuntu.com/v1/19f68eeb-Ubuntu%5Bwdth,wght%5D-latin-extended-v0.896a.woff2') format('woff2-variations'); |
| 79 | + unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; |
| 80 | +} |
| 81 | + |
| 82 | + |
| 83 | +/** Define font-weights as per Vanilla |
| 84 | + Based on: https://github.com/canonical/vanilla-framework/blob/main/scss/_base_typography-definitions.scss |
| 85 | +
|
| 86 | + regular text: 400, |
| 87 | + bold: 550, |
| 88 | + thin: 300, |
| 89 | +
|
| 90 | + h1: bold, |
| 91 | + h2: 180; |
| 92 | + h3: bold, |
| 93 | + h4: 275, |
| 94 | + h5: bold, |
| 95 | + h6: regular |
| 96 | +*/ |
| 97 | + |
| 98 | +/* default regular text */ |
| 99 | +html { |
| 100 | + font-weight: 400; |
5 | 101 | } |
6 | 102 |
|
7 | | -.toc-tree li.scroll-current>.reference, dl.glossary dt, dl.simple dt, dl:not([class]) dt { |
8 | | - font-weight: 400; |
| 103 | +/* heading specific definitions */ |
| 104 | +h1, h3, h5 { font-weight: 550; } |
| 105 | +h2 { font-weight: 180; } |
| 106 | +h4 { font-weight: 275; } |
| 107 | + |
| 108 | +/* bold */ |
| 109 | +.toc-tree li.scroll-current>.reference, |
| 110 | +dl.glossary dt, |
| 111 | +dl.simple dt, |
| 112 | +dl:not([class]) dt { |
| 113 | + font-weight: 550; |
9 | 114 | } |
10 | 115 |
|
| 116 | + |
11 | 117 | /** Table styling **/ |
12 | 118 |
|
13 | 119 | th.head { |
14 | 120 | text-transform: uppercase; |
15 | 121 | font-size: var(--font-size--small); |
| 122 | + text-align: initial; |
| 123 | +} |
| 124 | + |
| 125 | +table.align-center th.head { |
| 126 | + text-align: center |
16 | 127 | } |
17 | 128 |
|
18 | 129 | table.docutils { |
@@ -57,34 +168,63 @@ a.headerlink { |
57 | 168 | border-left: 2px solid var(--color-brand-primary); |
58 | 169 | } |
59 | 170 |
|
60 | | -/** Some tweaks for issue #16 **/ |
| 171 | +/** Some tweaks for Sphinx tabs **/ |
61 | 172 |
|
62 | 173 | [role="tablist"] { |
63 | 174 | border-bottom: 1px solid var(--color-sidebar-item-background--hover); |
64 | 175 | } |
65 | 176 |
|
66 | | -.sphinx-tabs-tab[aria-selected="true"] { |
| 177 | +.sphinx-tabs-tab[aria-selected="true"], .sd-tab-set>input:checked+label{ |
67 | 178 | border: 0; |
68 | 179 | border-bottom: 2px solid var(--color-brand-primary); |
69 | | - background-color: var(--color-sidebar-item-background--current); |
70 | | - font-weight:300; |
| 180 | + font-weight: 400; |
| 181 | + font-size: 1rem; |
| 182 | + color: var(--color-brand-primary); |
| 183 | +} |
| 184 | + |
| 185 | +body[data-theme="dark"] .sphinx-tabs-tab[aria-selected="true"] { |
| 186 | + background: var(--color-background-primary); |
| 187 | + border-bottom: 2px solid var(--color-brand-primary); |
| 188 | +} |
| 189 | + |
| 190 | +button.sphinx-tabs-tab[aria-selected="false"]:hover, .sd-tab-set>input:not(:checked)+label:hover { |
| 191 | + border-bottom: 2px solid var(--color-foreground-border); |
| 192 | +} |
| 193 | + |
| 194 | +button.sphinx-tabs-tab[aria-selected="false"]{ |
| 195 | + border-bottom: 2px solid var(--color-background-primary); |
| 196 | +} |
| 197 | + |
| 198 | +body[data-theme="dark"] .sphinx-tabs-tab { |
| 199 | + background: var(--color-background-primary); |
71 | 200 | } |
72 | 201 |
|
73 | | -.sphinx-tabs-tab{ |
| 202 | +.sphinx-tabs-tab, .sd-tab-set>label{ |
74 | 203 | color: var(--color-brand-primary); |
75 | | - font-weight:300; |
| 204 | + font-family: var(--font-stack); |
| 205 | + font-weight: 400; |
| 206 | + font-size: 1rem; |
| 207 | + padding: 1em 1.25em .5em |
76 | 208 | } |
77 | 209 |
|
78 | 210 | .sphinx-tabs-panel { |
79 | 211 | border: 0; |
80 | 212 | border-bottom: 1px solid var(--color-sidebar-item-background--hover); |
81 | 213 | background: var(--color-background-primary); |
| 214 | + padding: 0.75rem 0 0.75rem 0; |
82 | 215 | } |
83 | 216 |
|
84 | | -button.sphinx-tabs-tab:hover { |
85 | | - background-color: var(--color-sidebar-item-background--hover); |
| 217 | +body[data-theme="dark"] .sphinx-tabs-panel { |
| 218 | + background: var(--color-background-primary); |
| 219 | +} |
| 220 | + |
| 221 | +/** A tweak for issue #190 **/ |
| 222 | + |
| 223 | +.highlight .hll { |
| 224 | + background-color: var(--color-highlighted-background); |
86 | 225 | } |
87 | 226 |
|
| 227 | + |
88 | 228 | /** Custom classes to fix scrolling in tables by decreasing the |
89 | 229 | font size or breaking certain columns. |
90 | 230 | Specify the classes in the Markdown file with, for example: |
@@ -187,3 +327,35 @@ details summary { |
187 | 327 | color: var(--color-version-popup); |
188 | 328 | font-weight: bolder; |
189 | 329 | } |
| 330 | + |
| 331 | +/* Code-block copybutton invisible by default |
| 332 | + (overriding Furo config to achieve default copybutton setting). */ |
| 333 | +.highlight button.copybtn { |
| 334 | + opacity: 0; |
| 335 | +} |
| 336 | + |
| 337 | +/* Mimicking the 'Give feedback' button for UX consistency */ |
| 338 | +.sidebar-search-container input[type=submit] { |
| 339 | + color: #FFFFFF; |
| 340 | + border: 2px solid #D6410D; |
| 341 | + padding: var(--sidebar-search-input-spacing-vertical) var(--sidebar-search-input-spacing-horizontal); |
| 342 | + background: #D6410D; |
| 343 | + font-weight: bold; |
| 344 | + font-size: var(--font-size--small); |
| 345 | + cursor: pointer; |
| 346 | +} |
| 347 | + |
| 348 | +.sidebar-search-container input[type=submit]:hover { |
| 349 | + text-decoration: underline; |
| 350 | +} |
| 351 | + |
| 352 | +/* Make inline code the same size as code blocks */ |
| 353 | +p code.literal { |
| 354 | + border: 0; |
| 355 | + font-size: var(--code-font-size); |
| 356 | +} |
| 357 | + |
| 358 | +/* Use the general admonition font size for inline code */ |
| 359 | +.admonition p code.literal { |
| 360 | + font-size: var(--admonition-font-size); |
| 361 | +} |
0 commit comments