Skip to content

Commit f6f2235

Browse files
committed
👌 Improve css
1 parent 8647f12 commit f6f2235

File tree

4 files changed

+21
-15
lines changed

4 files changed

+21
-15
lines changed

sphinx_design/compiled/style.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

style/_dropdown.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ details.sd-dropdown {
33
position: relative;
44

55
.sd-summary-title {
6+
font-weight: 700;
67
// don't overlap the chevron
78
padding-right: 3em !important;
89
-moz-user-select: none;

style/_tabs.scss

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,19 @@
1313

1414
// Active tab label
1515
&:checked + label {
16-
border-color: var(--tabs-color-label-active);
17-
color: var(--tabs-color-label-active);
16+
border-color: var(--sd-color-tabs-label-active);
17+
color: var(--sd-color-tabs-label-active);
1818

1919
// Show tabbed block content
2020
+ .sd-tab-content {
2121
display: block;
2222
}
2323
}
2424

25+
&:not(:checked) + label:hover {
26+
border-color: var(--sd-color-tabs-label-inactive);
27+
}
28+
2529
// Focused tab label
2630
&:focus + label {
2731
outline-style: auto;
@@ -37,30 +41,31 @@
3741
// Tab label
3842
> label {
3943
border-bottom: 0.125rem solid transparent;
40-
color: var(--tabs-color-label-inactive);
44+
margin-bottom: 0;
45+
color: var(--sd-color-tabs-label-inactive);
4146
cursor: pointer;
42-
font-size: var(--tabs-size-label);
47+
font-size: var(--sd-fontsize-tabs-label);
4348
font-weight: 700;
44-
padding: 1em 1.25em .5em;
49+
padding: 1em 1.25em 0.5em;
4550
transition: color 250ms;
4651
width: auto;
4752
z-index: 1;
4853

4954
// Hovered label
5055
html &:hover {
51-
color: var(--tabs-color-label-active);
56+
color: var(--sd-color-tabs-label-active);
5257
}
5358
}
5459
}
5560

5661
.sd-col > .sd-tab-set {
57-
width: 100%;
62+
width: 100%;
5863
}
5964

6065
// Tabbed block content
6166
.sd-tab-content {
62-
box-shadow: 0 -0.0625rem var(--tabs-color-overline),
63-
0 0.0625rem var(--tabs-color-underline);
67+
box-shadow: 0 -0.0625rem var(--sd-color-tabs-overline),
68+
0 0.0625rem var(--sd-color-tabs-underline);
6469
display: none;
6570
order: 99;
6671
padding-bottom: 0.75rem;

style/_variables.scss

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@
2121
--sd-color-card-header: transparent;
2222
--sd-color-card-footer: transparent;
2323
// tabs
24-
--tabs-color-label-active: rgb(33, 35, 43);
25-
--tabs-color-label-inactive: rgba(178, 206, 245, 0.62);
26-
--tabs-color-overline: rgb(207, 236, 238);
27-
--tabs-color-underline: rgb(207, 236, 238);
28-
--tabs-size-label: 1rem;
24+
--sd-color-tabs-label-active: hsla(231, 99%, 66%, 1);
25+
--sd-color-tabs-label-inactive: rgba(178, 206, 245, 0.62);
26+
--sd-color-tabs-overline: rgb(207, 236, 238);
27+
--sd-color-tabs-underline: rgb(207, 236, 238);
28+
--sd-fontsize-tabs-label: 1rem;
2929
}

0 commit comments

Comments
 (0)