Skip to content

Commit 5aba47e

Browse files
committed
Adjust darkmode color
1 parent e115453 commit 5aba47e

35 files changed

+107
-57
lines changed

public/assets/github-white-800.svg

Lines changed: 3 additions & 0 deletions
Loading

public/scroll-docs-white-800.svg

Lines changed: 25 additions & 0 deletions
Loading

src/assets/svgs/header/sun.svg

Lines changed: 1 addition & 1 deletion
Loading

src/components/Aside.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const icons = {
2121

2222
<aside class={`content ${type}`} aria-label={title}>
2323
<div class="icon">
24-
<span class="inline-block w-[1.5rem] h-[1.5rem] text-black dark:text-white">
24+
<span class="inline-block w-[1.5rem] h-[1.5rem] text-black dark:text-white-800">
2525
<Fragment set:html={icons[type]} />
2626
</span>
2727
</div>

src/components/Footer/Subscribe/EmailInput.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ const EmailInput = (props) => {
3232
onKeyDown={handleEnter}
3333
className={clsx(
3434
styles.inputBase,
35-
"dark:text-white",
35+
"dark:text-white-800",
3636
"dark:bg-black",
37-
"dark:border-white",
37+
"dark:border-white-800",
3838
"placeholder:text-[#dcdcdc]",
3939
"placeholder:dark:text-[#FFF8F366]",
4040
"focus:outline-none"

src/components/Header/Header.astro

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ const section = frontmatter?.section ?? ""
5353
<a href={localizePath("/home")}>
5454
<span
5555
class={clsx(
56-
"inline-block w-[144px] h-[22px] dark:bg-[url('/scroll-docs-white.svg')] bg-contain bg-no-repeat bg-center",
56+
"inline-block w-[144px] h-[22px] dark:bg-[url('/scroll-docs-white-800.svg')] bg-contain bg-no-repeat bg-center",
5757
dark ? "bg-[url('/scroll-docs-white.svg')]" : "bg-[url('/scroll-docs.svg')]"
5858
)}></span>
5959
</a>
@@ -83,7 +83,7 @@ const section = frontmatter?.section ?? ""
8383
<a href="https://github.com/scroll-tech/scroll-documentation" class="github-url" target="_blank" rel="nofollow">
8484
<span
8585
class={clsx(
86-
"inline-block w-[35px] h-[35px] dark:bg-[url('/assets/github-white.svg')] bg-contain bg-no-repeat bg-center",
86+
"inline-block w-[35px] h-[35px] dark:bg-[url('/assets/github-white-800.svg')] bg-contain bg-no-repeat bg-center",
8787
dark ? "bg-[url('/assets/github-white.svg')]" : "bg-[url('/assets/github.svg')]"
8888
)}></span>
8989
</a>
@@ -113,7 +113,7 @@ const section = frontmatter?.section ?? ""
113113
.nav-link {
114114
line-height: 32px;
115115
padding-top: 7px;
116-
@apply text-black dark:text-white;
116+
@apply text-black dark:text-white-800;
117117
color: var(--textColor);
118118
white-space: nowrap;
119119
}

src/components/Header/LanguageSelector/LanguageSelector.astro

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,14 @@ const getLabel = (language) => {
2525
}
2626
---
2727

28-
<div class={clsx("language-selector", dark && "dark")}>
29-
<div class="current-language">
28+
<div class={clsx("language-selector")}>
29+
<div
30+
class={clsx(
31+
"current-language",
32+
"text-black border-black dark:text-white-800 dark:border-white-800",
33+
dark ? "text-white border-white" : ""
34+
)}
35+
>
3036
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 14 14" fill="none">
3137
<path
3238
d="M12.0886 2.19173C11.899 1.99095 11.5825 1.98187 11.3817 2.17145C11.181 2.36103 11.1719 2.67748 11.3615 2.87827L12.0886 2.19173ZM9.82896 1.70578C10.0724 1.83614 10.3754 1.74448 10.5058 1.50104C10.6361 1.25761 10.5445 0.954588 10.301 0.824224L9.82896 1.70578ZM6.475 0.71L6.83644 1.05549L6.83781 1.05405L6.475 0.71ZM6.51 13.325L6.84218 12.9513L6.84158 12.9508L6.51 13.325ZM7.43 13.27L7.8006 13.6056L7.80182 13.6043L7.43 13.27ZM11.3615 2.87827C12.3774 3.95429 13 5.40282 13 7H14C14 5.13718 13.2726 3.44571 12.0886 2.19173L11.3615 2.87827ZM13 7C13 10.3139 10.3139 13 7 13V14C10.8661 14 14 10.8661 14 7H13ZM7 13C3.68614 13 1 10.3139 1 7H0C0 10.8661 3.13386 14 7 14V13ZM1 7C1 3.68614 3.68614 1 7 1V0C3.13386 0 0 3.13386 0 7H1ZM7 1C8.02607 1 8.98516 1.25391 9.82896 1.70578L10.301 0.824224C9.31484 0.296094 8.19393 0 7 0V1ZM1.50005 4.99H12.965V3.99H1.50005V4.99ZM1.49999 9.995H12.97V8.995H1.49999V9.995ZM7.81355 0.406447C7.39863 -0.00847185 6.63779 -0.188318 6.11219 0.365954L6.83781 1.05405C6.86485 1.02554 6.89025 1.0169 6.92687 1.01975C6.97276 1.02331 7.04172 1.04883 7.10645 1.11355L7.81355 0.406447ZM6.11356 0.364509C5.02397 1.5044 4 3.93397 4 7.225H5C5 4.10603 5.97603 1.9556 6.83644 1.05549L6.11356 0.364509ZM4 7.225C4 10.5231 5.07388 12.7206 6.17842 13.6992L6.84158 12.9508C6.01612 12.2194 5 10.3369 5 7.225H4ZM6.17782 13.6987C6.65963 14.127 7.3826 14.0672 7.8006 13.6056L7.0594 12.9344C6.9974 13.0028 6.90037 13.003 6.84218 12.9513L6.17782 13.6987ZM7.80182 13.6043C8.80675 12.4865 10 10.6511 10 7.23H9C9 10.3689 7.92325 11.9735 7.05818 12.9357L7.80182 13.6043ZM10 7.23C10 3.85511 8.90599 1.49888 7.81355 0.406447L7.10645 1.11355C7.96401 1.97112 9 4.04489 9 7.23H10Z"
@@ -35,14 +41,23 @@ const getLabel = (language) => {
3541
<span>{getLabel(supportedLanguages[0])}</span>
3642
</div>
3743
<div class="options-modal">
38-
<ul class="options-list">
44+
<ul
45+
class={clsx(
46+
"options-list",
47+
"bg-pure-white border-black dark:border-white-800 dark:bg-black",
48+
dark ? "!bg-pure-black !border-white dark:!border-white-800" : ""
49+
)}
50+
>
3951
{
4052
supportedLanguages.map((supportedLanguage, idx) => {
4153
let value = localizePath(pathname, supportedLanguage)
4254
const label = getLabel(supportedLanguage)
43-
4455
return (
45-
<li value={value} onclick={`if ("${value}" !== window.location.pathname) location.href = "${value}";`}>
56+
<li
57+
class={clsx("text-black dark:text-white-800", dark ? "text-white dark:text-white-800" : "")}
58+
value={value}
59+
onclick={`if ("${value}" !== window.location.pathname) location.href = "${value}";`}
60+
>
4661
{idx === 0 ? (
4762
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none">
4863
<rect x="0.5" y="0.5" width="15" height="15" rx="7.5" stroke="currentColor" />
@@ -88,7 +103,6 @@ const getLabel = (language) => {
88103
justify-content: space-between;
89104
align-items: center;
90105
cursor: pointer;
91-
@apply text-black dark:text-white border-black dark:border-white;
92106
}
93107

94108
.options-list {
@@ -107,7 +121,6 @@ const getLabel = (language) => {
107121
justify-content: center;
108122
align-items: center;
109123
flex-direction: column;
110-
@apply bg-pure-white dark:bg-black border-black dark:border-white;
111124
}
112125

113126
.options-list li {
@@ -117,7 +130,6 @@ const getLabel = (language) => {
117130
align-items: center;
118131
flex-direction: row;
119132
padding: 8px 0px;
120-
@apply text-black dark:text-white;
121133
}
122134

123135
.options-list li svg,

0 commit comments

Comments
 (0)