Skip to content

Commit 8d91524

Browse files
authored
fix(css): reuse css vars (#256)
1 parent 9bc5c5c commit 8d91524

File tree

6 files changed

+9
-7
lines changed

6 files changed

+9
-7
lines changed

src/client/theme-default/components/BuySellAds.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ function load() {
6969
7070
.bsa-cpc {
7171
border-radius: 6px;
72-
background-color: #f8f8f8;
72+
background-color: var(--c-bg-accent);
7373
}
7474
7575
.bsa-cpc ::v-deep(a._default_) {

src/client/theme-default/components/CarbonAds.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ onMounted(() => {
2626
margin: 0 auto;
2727
max-width: 280px;
2828
font-size: 0.75rem;
29-
background-color: rgba(255, 255, 255, 0.8);
29+
background-color: var(--c-bg-accent);
3030
min-height: 105.38px; /* avoid layout shift on mobile */
3131
}
3232

src/client/theme-default/components/HomeHero.vue

+3-3
Original file line numberDiff line numberDiff line change
@@ -140,20 +140,20 @@ const hasAltAction = computed(
140140
line-height: 44px;
141141
font-size: 1rem;
142142
font-weight: 500;
143-
color: #ffffff;
143+
color: var(--c-bg);
144144
background-color: var(--c-brand);
145145
border: 2px solid var(--c-brand);
146146
transition: background-color 0.1s ease;
147147
}
148148
149149
.action.alt :deep(.item) {
150-
background-color: #fff;
150+
background-color: var(--c-bg);
151151
color: var(--c-brand);
152152
}
153153
154154
.action :deep(.item:hover) {
155155
text-decoration: none;
156-
color: #ffffff;
156+
color: var(--c-bg);
157157
background-color: var(--c-brand-light);
158158
}
159159

src/client/theme-default/components/NavBar.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ defineEmit(['toggle'])
3636
border-bottom: 1px solid var(--c-divider);
3737
padding: 0.7rem 1.5rem 0.7rem 4rem;
3838
height: var(--header-height);
39-
background-color: #ffffff;
39+
background-color: inherit;
4040
}
4141
4242
@media (min-width: 720px) {

src/client/theme-default/styles/custom-blocks.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
.custom-block.tip {
1111
background-color: #f3f5f7;
12-
border-color: #42b983;
12+
border-color: var(--c-brand);
1313
}
1414

1515
.custom-block.warning {

src/client/theme-default/styles/vars.css

+2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
* --------------------------------------------------------------------- */
66

77
--c-white: #ffffff;
8+
--c-white-dark: #f8f8f8;
89
--c-black: #000000;
910

1011
--c-divider-light: rgba(60, 60, 67, 0.12);
@@ -63,6 +64,7 @@
6364
--c-text-lighter: var(--c-text-light-3);
6465

6566
--c-bg: var(--c-white);
67+
--c-bg-accent: var(--c-white-dark);
6668

6769
--code-line-height: 24px;
6870
--code-font-family: var(--font-family-mono);

0 commit comments

Comments
 (0)