Skip to content

Commit 5c94523

Browse files
committed
chore: Conform colors into better var names
1 parent 2da7ecb commit 5c94523

File tree

1 file changed

+42
-37
lines changed

1 file changed

+42
-37
lines changed

assets/css/v2/style.css

Lines changed: 42 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@
5757
--color-brand-100: #f2faf5;
5858
--color-background: #ffffff;
5959
--color-foreground: #000000;
60+
--color-bg-dark: 0 0 0;
61+
--color-bg-light: 1 0 0;
6062
--color-shadow: #d2d2d2;
6163
--color-codeblock-border: #888;
6264
--color-codeblock-shadow: #e5e5e5;
@@ -251,8 +253,8 @@ header {
251253

252254
.dropdown-content {
253255
position: absolute;
254-
background-color: white;
255-
border: black 1px solid;
256+
background-color: oklch(var(--color-bg-light));
257+
border: oklch(var(--color-black)) 1px solid;
256258
box-shadow: 3px 3px 0px var(--color-shadow);
257259
z-index: 1;
258260
right: 0;
@@ -385,7 +387,7 @@ nav {
385387

386388
/* Styling for items */
387389
.homepage-item {
388-
background: #fff;
390+
background: oklch(var(--color-bg-light));
389391
border: 1px solid var(--color-codeblock-border);
390392
box-shadow: 3px 3px 0px var(--color-shadow);
391393
height: 7rem;
@@ -618,12 +620,12 @@ atomic-search-interface {
618620
atomic-search-box {
619621
&::part(wrapper) {
620622
border-radius: 0;
621-
border-color: black;
623+
border-color: oklch(var(--color-black));
622624
}
623625

624626
&::part(suggestions-wrapper) {
625627
border-radius: 0;
626-
border-color: black;
628+
border-color: oklch(var(--color-black));
627629
width: calc(100% + 2px);
628630
margin-left: -1px;
629631
}
@@ -749,8 +751,8 @@ body:not(:has(.main-layout)) header atomic-search-interface {
749751
margin-top: 8.375rem;
750752
margin-left: 44rem;
751753
padding: 1rem 1.5rem;
752-
background-color: white;
753-
border: black 1px solid;
754+
background-color: oklch(var(--color-bg-light));
755+
border: oklch(var(--color-black)) 1px solid;
754756
box-shadow: 3px 3px 0px var(--color-shadow);
755757
}
756758

@@ -778,7 +780,7 @@ button:has(~ .product-selector[style*="none"]) > .product-selector-button-icon {
778780

779781
.product-selector a {
780782
text-decoration: none;
781-
color: black;
783+
color: oklch(var(--color-black));
782784
font-size: 1rem;
783785
}
784786

@@ -816,7 +818,7 @@ button:has(~ .product-selector[style*="none"]) > .product-selector-button-icon {
816818

817819
.sidebar .sidebar-navigation a {
818820
text-decoration: none;
819-
color: black;
821+
color: oklch(var(--color-black));
820822
}
821823

822824
.sidebar .sidebar-navigation .collapsible-header {
@@ -854,7 +856,7 @@ button:has(~ .product-selector[style*="none"]) > .product-selector-button-icon {
854856
.toggle-checkbox:checked ~ .collapsible-content::before {
855857
content: "";
856858
position: absolute;
857-
border-left: black 1px solid;
859+
border-left: oklch(var(--color-black)) 1px solid;
858860
left: -8.5px;
859861
top: -22.5px;
860862
height: calc(100% + 13.5px);
@@ -868,7 +870,7 @@ button:has(~ .product-selector[style*="none"]) > .product-selector-button-icon {
868870
.collapsible-content .box::after {
869871
content: "";
870872
position: absolute;
871-
border-top: black 1px solid;
873+
border-top: oklch(var(--color-black)) 1px solid;
872874
left: -11.5px;
873875
width: var(--sidebar-line-width);
874876
top: 50%;
@@ -877,7 +879,7 @@ button:has(~ .product-selector[style*="none"]) > .product-selector-button-icon {
877879
.collapsible-content .opened::after {
878880
content: "";
879881
position: absolute;
880-
border-top: black 1px solid;
882+
border-top: oklch(var(--color-black)) 1px solid;
881883
left: -12.5px;
882884
width: var(--sidebar-line-width);
883885
top: 50%;
@@ -886,7 +888,7 @@ button:has(~ .product-selector[style*="none"]) > .product-selector-button-icon {
886888
.collapsible-content .box-link::after {
887889
content: "";
888890
position: absolute;
889-
border-top: black 1px solid;
891+
border-top: oklch(var(--color-black)) 1px solid;
890892
left: -11.5px;
891893
width: var(--sidebar-line-width);
892894
top: 50%;
@@ -902,7 +904,7 @@ button:has(~ .product-selector[style*="none"]) > .product-selector-button-icon {
902904

903905
.sidebar .sidebar-navigation ul li .parent-box-link {
904906
content: "";
905-
background-color: black;
907+
background-color: oklch(var(--color-black));
906908
position: absolute;
907909
width: 1px;
908910
height: var(--sidebar-line-box-side-length);
@@ -912,7 +914,7 @@ button:has(~ .product-selector[style*="none"]) > .product-selector-button-icon {
912914

913915
.sidebar .sidebar-navigation ul li .box-link {
914916
content: "";
915-
background-color: black;
917+
background-color: oklch(var(--color-black));
916918
position: absolute;
917919
width: 1px;
918920
height: var(--sidebar-line-box-side-length);
@@ -940,11 +942,11 @@ button:has(~ .product-selector[style*="none"]) > .product-selector-button-icon {
940942
}
941943

942944
.sidebar .sidebar-navigation ul li .expand {
943-
background-color: black;
945+
background-color: oklch(var(--color-black));
944946
}
945947

946948
.sidebar .sidebar-navigation ul li .opened {
947-
border: black 1px solid;
949+
border: oklch(var(--color-black)) 1px solid;
948950
}
949951

950952
.sidebar .sidebar-navigation ul li .current {
@@ -969,7 +971,7 @@ button:has(~ .product-selector[style*="none"]) > .product-selector-button-icon {
969971
.sidebar .sidebar-navigation .parent-collapsible-content:first-child::before {
970972
content: "";
971973
position: absolute;
972-
border-left: black 1px solid;
974+
border-left: oklch(var(--color-black)) 1px solid;
973975
left: -24px;
974976
top: 10px;
975977
height: calc(100% - 9px - 10px);
@@ -993,7 +995,7 @@ button:has(~ .product-selector[style*="none"]) > .product-selector-button-icon {
993995
.parent-box::before {
994996
content: "";
995997
display: block;
996-
border-top: black 1px solid;
998+
border-top: oklch(var(--color-black)) 1px solid;
997999
margin-left: -12px;
9981000
margin-top: 50%;
9991001
width: var(--sidebar-line-width);
@@ -1002,7 +1004,7 @@ button:has(~ .product-selector[style*="none"]) > .product-selector-button-icon {
10021004
.parent-collapsible-content .parent-box-link::after {
10031005
content: "";
10041006
position: absolute;
1005-
border-top: black 1px solid;
1007+
border-top: oklch(var(--color-black)) 1px solid;
10061008
left: -11.5px;
10071009
width: var(--sidebar-line-width);
10081010
top: 50%;
@@ -1147,7 +1149,7 @@ h6:has(a):hover {
11471149
.headerlink {
11481150
text-decoration: none;
11491151

1150-
color: black;
1152+
color: oklch(var(--color-black));
11511153
}
11521154

11531155
.headerlink::before {
@@ -1360,7 +1362,7 @@ blockquote.important {
13601362
content: "";
13611363
position: absolute;
13621364
display: block;
1363-
border-bottom: 1px solid black;
1365+
border-bottom: 1px solid oklch(var(--color-black));
13641366
bottom: 0;
13651367
right: 0;
13661368
width: 2rem;
@@ -1388,7 +1390,7 @@ blockquote.important {
13881390
content: "";
13891391
position: absolute;
13901392
display: block;
1391-
border-bottom: 1px solid black;
1393+
border-bottom: 1px solid oklch(var(--color-black));
13921394
bottom: 0;
13931395
left: 0;
13941396
width: 2rem;
@@ -1398,7 +1400,7 @@ blockquote.important {
13981400
content: "";
13991401
position: relative;
14001402
display: block;
1401-
border-bottom: 1px solid black;
1403+
border-bottom: 1px solid oklch(var(--color-black));
14021404
bottom: 0;
14031405
left: 0;
14041406
width: 100%;
@@ -1409,14 +1411,17 @@ blockquote.important {
14091411
--mask-image-content: linear-gradient(
14101412
to right,
14111413
transparent,
1412-
black var(--mask-height),
1413-
black calc(100% - var(--mask-height)),
1414+
oklch(var(--color-black)) var(--mask-height),
1415+
oklch(var(--color-black)) calc(100% - var(--mask-height)),
14141416
transparent
14151417
);
14161418

14171419
--mask-size-content: 100% calc(100% - var(--scrollbar-width));
14181420

1419-
--mask-image-scrollbar: linear-gradient(black, black);
1421+
--mask-image-scrollbar: linear-gradient(
1422+
oklch(var(--color-black)),
1423+
oklch(var(--color-black))
1424+
);
14201425
--mask-size-scrollbar: 100% var(--scrollbar-width);
14211426
mask-image: var(--mask-image-content), var(--mask-image-scrollbar);
14221427
mask-size: var(--mask-size-content), var(--mask-size-scrollbar);
@@ -1426,7 +1431,7 @@ blockquote.important {
14261431

14271432
.nav-item {
14281433
border: 1px solid var(--color-tabs-divider);
1429-
border-bottom: 1px solid black;
1434+
border-bottom: 1px solid oklch(var(--color-black));
14301435
padding: 10px;
14311436
margin-bottom: 0;
14321437

@@ -1435,29 +1440,29 @@ blockquote.important {
14351440
}
14361441

14371442
.active {
1438-
color: black;
1443+
color: oklch(var(--color-black));
14391444
}
14401445
}
14411446

14421447
.nav-item:has(.active) {
14431448
/* Change the border colors of li that is has a child with a class "active" */
1444-
border-top: 1px solid black;
1445-
border-left: 1px solid black;
1449+
border-top: 1px solid oklch(var(--color-black));
1450+
border-left: 1px solid oklch(var(--color-black));
14461451
border-bottom: none;
14471452

14481453
/* Change the border of next child */
14491454
+ li {
1450-
border-left: 1px solid black;
1455+
border-left: 1px solid oklch(var(--color-black));
14511456
}
14521457
}
14531458

14541459
.nav-item:last-child:has(.active) {
14551460
/* If on last tab, change the right border since it does not have a next sibling */
1456-
border-right: 1px solid black;
1461+
border-right: 1px solid oklch(var(--color-black));
14571462
}
14581463

14591464
.tab-content {
1460-
border-bottom: 1px solid black;
1465+
border-bottom: 1px solid oklch(var(--color-black));
14611466
padding-bottom: 1rem;
14621467
padding-left: 1rem;
14631468
padding-right: 1rem;
@@ -1563,7 +1568,7 @@ code:not(pre code) {
15631568
font-size: 0.75rem;
15641569
z-index: 999;
15651570
/* position: absolute; */
1566-
background-color: white;
1571+
background-color: oklch(var(--color-bg-light));
15671572
margin: 0 0 -1px 0;
15681573
/* box-shadow: 2px 2px 0px var(--color-shadow); */
15691574
}
@@ -1584,8 +1589,8 @@ ul .code-block {
15841589
}
15851590

15861591
.code-copy-button {
1587-
background-color: white;
1588-
border: 1px solid black;
1592+
background-color: oklch(var(--color-bg-light));
1593+
border: 1px solid oklch(var(--color-black));
15891594
padding: 4px 6px;
15901595
cursor: pointer;
15911596
font-size: 12px;

0 commit comments

Comments
 (0)