Skip to content

Commit 7c64443

Browse files
style tabs to align with our design (#9749)
* style tabs as per design * fix font weights * push bold to 700
2 parents a7d1fb1 + bc60c0a commit 7c64443

File tree

14 files changed

+45
-38
lines changed

14 files changed

+45
-38
lines changed

ui/src/css/base.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ kbd,
4141
pre {
4242
font-family: var(--monospace-font-family);
4343
font-size: 16px;
44-
font-weight: 300;
44+
font-weight: 400;
4545
}
4646

4747
b,

ui/src/css/doc.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1387,7 +1387,7 @@
13871387
.doc dl,
13881388
.doc table {
13891389
margin: 0 0 1rem;
1390-
font-weight: 300;
1390+
font-weight: 400;
13911391
}
13921392

13931393
/* inline links pick up the new blue */

ui/src/css/site.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
@import "tailwindcss";
22
@import "typeface-inter.css";
33
@import "typeface-ibm-plex-mono.css";
4+
@import "typeface-roboto.css";
45
@import "vars.css";
56
@import "base.css";
67
@import "body.css";

ui/src/css/tabs.css

Lines changed: 21 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -9,32 +9,43 @@
99
list-style: none;
1010
margin: 0;
1111
padding: 0;
12+
border-bottom: 1px solid var(--color-vapor);
1213
}
1314

1415
.tablist > ul li {
1516
align-items: center;
1617
background-color: #fff;
1718
cursor: pointer;
1819
display: flex;
19-
font-weight: bold;
20+
font-weight: 400;
2021
line-height: 1.5;
21-
padding: 0.25em 1em;
22+
padding: 1em 1px;
23+
margin-right: 1.5em;
2224
position: relative;
2325
}
2426

27+
.tablist > ul li.is-selected {
28+
font-weight: 600;
29+
border-bottom: 2px solid var(--color-accent-green);
30+
}
31+
32+
.tablist > ul li p {
33+
font-weight: inherit;
34+
}
35+
2536
.tablist > ul li:focus-visible {
2637
outline: none;
2738
}
2839

29-
.tablist.ulist,
30-
.tablist.ulist > ul li {
40+
.tablist.ulist {
3141
margin: 0;
3242
}
3343

34-
.tablist.ulist > ul li + li {
35-
margin-left: 0.25em;
44+
.tablist.ulist > ul li {
45+
margin: 0 1.5em 0 0;
3646
}
3747

48+
/* Disabled to allow borders to show
3849
.tabs .tablist li::after {
3950
content: "";
4051
display: block;
@@ -44,14 +55,14 @@
4455
left: 0;
4556
right: 0;
4657
}
58+
*/
4759

4860
.tabs.is-loading .tablist li:not(:first-child),
4961
.tabs:not(.is-loading) .tablist li:not(.is-selected) {
50-
background-color: #f5f5f5;
62+
background-color: transparent;
5163
}
5264

53-
.tabs.is-loading .tablist li:first-child::after,
54-
.tabs:not(.is-loading) .tablist li.is-selected::after {
65+
.tabs.is-loading .tablist li:first-child::after {
5566
background-color: #fff;
5667
}
5768

@@ -69,21 +80,7 @@
6980

7081
.tabpanel {
7182
background-color: #fff;
72-
padding: 1.25em;
73-
}
74-
75-
.tablist > ul li {
76-
border: 1px solid #dcdcdc;
77-
border-radius: 8px 8px 0 0;
78-
}
79-
80-
.tabpanel {
81-
border: 1px solid #dcdcdc;
82-
border-radius: 0 0 8px 8px;
83-
}
84-
85-
.tablist > ul li {
86-
border-bottom: 0;
83+
padding: 1.25em 0;
8784
}
8885

8986
.tabs.is-loading .tabpanel + .tabpanel,

ui/src/css/toc.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
.toc .toc-menu h3 {
1414
color: var(--toc-heading-font-color);
1515
font-size: large;
16-
font-weight: 400;
16+
font-weight: 500;
1717
font-family: 'Inter', sans-serif;
1818
line-height: 1.3;
1919
margin: 0 -0.5px;
@@ -82,7 +82,7 @@
8282
.toc .toc-menu a {
8383
font-family: 'Inter', sans-serif;
8484
font-size: medium;
85-
font-weight: 300;
85+
font-weight: 400;
8686
color: inherit;
8787
border-left: 1px solid var(--toc-border-color);
8888
display: inline-block;

ui/src/css/typeface-roboto.css

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
@font-face {
2+
font-family: "Roboto";
3+
font-style: normal;
4+
font-weight: 700;
5+
src:
6+
url(~@fontsource/roboto/files/roboto-latin-700-normal.woff2) format("woff2"),
7+
url(~@fontsource/roboto/files/roboto-latin-700-normal.woff) format("woff");
8+
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
9+
}

ui/src/css/vars.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
--body-line-height: 1.6;
2727
--body-font-color: var(--color-body-dark);
2828
--body-font-family: "Inter", sans-serif;
29-
--body-font-weight-bold: 600;
29+
--body-font-weight-bold: 700;
3030
--monospace-font-family: "IBM Plex Mono", monospace;
3131
--monospace-font-weight-bold: 600;
3232
/* base */

ui/src/partials/article-footer.hbs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@
77
<div class="inline-flex mt-6 md:mt-0 md:ml-8 space-x-4">
88
<button class="rounded-md px-2 py-2 inline-flex justify-center items-center border border-vapor space-x-1">
99
<img src="{{uiRootPath}}/img/thumbs-up.svg" alt="Thumbs Up" class="inline-block w-4 h-4">
10-
<span class="font-light">
10+
<span class="font-normal">
1111
Yes
1212
</span>
1313
</button>
1414
<button class="rounded-md px-2 py-2 inline-flex justify-center items-center border border-vapor space-x-1">
1515
<img src="{{uiRootPath}}/img/thumbs-down.svg" alt="Thumbs Up" class="inline-block w-4 h-4">
16-
<span class="font-light">
16+
<span class="font-normal">
1717
No
1818
</span>
1919
</button>

ui/src/partials/article-info-bar.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
{{#if page.attributes.platform}}
2424
<div class="flex items-center min-w-fit space-x-1 px-3 py-2 md:py-0 border-t md:border-t-0 md:border-l border-inherit">
2525
{{#each (split page.attributes.platform ',')}}
26-
<span class=" text-[10px] text-terminal-black border rounded-full py-1 px-1.5">{{this}}</span>
26+
<span class="text-[10px] text-terminal-black border rounded-full py-1 px-1.5" style="font-family: 'Roboto', sans-serif; font-weight: 700;">{{this}}</span>
2727
{{/each}}
2828
</div>
2929
{{/if}}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
<div role="navigation" aria-label="Article Toolbar" class="flex flex-col max-w-[800px] md:items-center mx-[32px] md:ml-[3.5rem] lg:ml-12 mt-6 md:mt-12 md:flex-row text-sm font-light" >
1+
<div role="navigation" aria-label="Article Toolbar" class="flex flex-col max-w-[800px] md:items-center mx-[32px] md:ml-[3.5rem] lg:ml-12 mt-6 md:mt-12 md:flex-row text-sm font-normal" >
22
{{> breadcrumbs}}
33
</div>

0 commit comments

Comments
 (0)