Skip to content

Commit 26eeff3

Browse files
committed
Move styles in Brand to css module, update styles
1 parent 5598086 commit 26eeff3

10 files changed

Lines changed: 41 additions & 24 deletions

File tree

src/components/Brand/index.astro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
import Logo from '@components/Brand/Logo.astro'
66
import WordmarkBuilders from '@components/Brand/WordmarkBuilders.astro'
77
import WordmarkWebstack from '@components/Brand/WordmarkWebstack.astro'
8-
import './index.css'
8+
import styles from './index.module.css'
99
---
1010

1111
<a
12-
class="flex items-stretch hover:brightness-90 focus:brightness-90"
12+
class:list={['flex items-stretch', styles.brandLink]}
1313
href="/"
1414
rel="home"
1515
aria-label="Webstack Builders home"

src/components/Brand/index.css

Lines changed: 0 additions & 11 deletions
This file was deleted.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
.brandLink :global(.logo-block-outer) {
2+
fill: var(--color-primary);
3+
}
4+
5+
.brandLink :global(.logo-block-inner) {
6+
fill: var(--color-secondary);
7+
}
8+
9+
.brandLink :global(.wordmark__svg-path) {
10+
fill: var(--color-primary);
11+
}
12+
13+
.brandLink:is(:hover, :focus, :focus-visible) :global(.logo-block-outer) {
14+
fill: var(--color-primary-offset);
15+
}
16+
17+
.brandLink:is(:hover, :focus, :focus-visible) :global(.logo-block-inner) {
18+
fill: var(--color-secondary-offset);
19+
}
20+
21+
.brandLink:is(:hover, :focus, :focus-visible) :global(.wordmark__svg-path) {
22+
fill: var(--color-primary-offset);
23+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
declare const styles: {
2+
readonly brandLink: string
3+
}
4+
5+
export default styles

src/components/ThemePicker/ThemeButton.astro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<style>
66
/* Theme picker button styles */
77
.theme-toggle-btn {
8-
background-color: var(--color-primary-offset);
8+
background-color: var(--color-primary);
99
border-radius: 50%;
1010
border-width: 0;
1111
height: var(--header-icon-size);
@@ -17,7 +17,7 @@
1717

1818
.theme-toggle-btn:hover,
1919
.theme-toggle-btn:focus {
20-
background-color: var(--color-primary);
20+
background-color: var(--color-primary-offset);
2121
outline-width: 0;
2222
}
2323

src/styles/theme-inline.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@
1212
--color-primary: var(--theme-color-primary); /* Light theme: #001A39 */
1313

1414
/** A shade of the primary color for accent */
15-
--color-primary-offset: var(--theme-color-primary-offset); /* Light theme: #00386d */
15+
--color-primary-offset: var(--theme-color-primary-offset); /* Light theme: #003d86 */
1616

1717
/** Secondary color for theme */
1818
--color-secondary: var(--theme-color-secondary); /* Light theme: #006dca */
1919

2020
/** A shade of the secondary color for accent */
21-
--color-secondary-offset: var(--theme-color-secondary-offset); /* Light theme: #0056a3 */
21+
--color-secondary-offset: var(--theme-color-secondary-offset); /* Light theme: #1894ff */
2222

2323
/** Accent color for theme */
2424
--color-accent: var(--theme-color-accent); /* Light theme: #7c3aed */

src/styles/themes/a11y.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
--a11y-theme-color-primary: #000;
1212
--a11y-theme-color-primary-offset: #111827;
1313
--a11y-theme-color-secondary: #000;
14-
--a11y-theme-color-secondary-offset: #000;
14+
--a11y-theme-color-secondary-offset: #111827;
1515
--a11y-theme-color-accent: #111827;
1616
--a11y-theme-color-accent-offset: #e5e7eb;
1717
--a11y-theme-color-page-base: #fff;

src/styles/themes/dark.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@
1414
--theme-color-primary: #f3f4f6;
1515

1616
/** A shade of the primary color for accent */
17-
--theme-color-primary-offset: #e5e7eb;
17+
--theme-color-primary-offset: #fff;
1818

1919
/** Secondary color for theme */
2020
--theme-color-secondary: #f3f4f6;
2121

2222
/** A shade of the secondary color for accent */
23-
--theme-color-secondary-offset: #d1d5db;
23+
--theme-color-secondary-offset: #fff;
2424

2525
/** Accent color for theme */
2626
--theme-color-accent: #8b5cf6;

src/styles/themes/holiday.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@
1414
--theme-color-primary: #f1f5f9;
1515

1616
/** A shade of the primary color for accent */
17-
--theme-color-primary-offset: #cbd5e1;
17+
--theme-color-primary-offset: #fff;
1818

1919
/** Secondary color for theme */
2020
--theme-color-secondary: #dc2626;
2121

2222
/** A shade of the secondary color for accent */
23-
--theme-color-secondary-offset: #b91c1c;
23+
--theme-color-secondary-offset: #e76868;
2424

2525
/** Accent color for theme */
2626
--theme-color-accent: #fbbf24;

src/styles/themes/light.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@
1414
--theme-color-primary: #001A39;
1515

1616
/** A shade of the primary color for accent */
17-
--theme-color-primary-offset: #00386d;
17+
--theme-color-primary-offset: #003d86;
1818

1919
/** Secondary color for theme */
2020
--theme-color-secondary: #006dca;
2121

2222
/** A shade of the secondary color for accent */
23-
--theme-color-secondary-offset: #0056a3;
23+
--theme-color-secondary-offset: #1894ff;
2424

2525
/** Accent color for theme */
2626
--theme-color-accent: #7c3aed;

0 commit comments

Comments
 (0)