Skip to content

Commit 97879da

Browse files
committed
Rest of bg-* and text-* CSS class refactors
1 parent c1b7b94 commit 97879da

53 files changed

Lines changed: 280 additions & 285 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎src/components/Animations/Computers/index.astro‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import Icon from '@components/Icon/index.astro'
99
<div class="relative w-full max-w-lg mx-auto">
1010
<button
1111
type="button"
12-
class="absolute bottom-1 right-1 z-10 flex items-center justify-center rounded-full border border-border bg-content-inverse p-1 text-text shadow-lg transition-colors hover:bg-content-inverse-offset"
12+
class="absolute bottom-1 right-1 z-10 flex items-center justify-center rounded-full border border-border bg-content-inverse p-1 text-content shadow-lg transition-colors hover:bg-content-inverse-offset"
1313
data-animation-toggle
1414
aria-label="Pause animation"
1515
aria-pressed="false"

‎src/components/Avatar/index.astro‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ const avatarAlt = name
5353
/>
5454
) : (
5555
<div
56-
class="avatar-placeholder bg-primary w-16 h-16 rounded-full flex items-center justify-center text-offset"
56+
class="avatar-placeholder bg-spotlight w-16 h-16 rounded-full flex items-center justify-center text-offset"
5757
role="img"
5858
aria-label={name}
5959
>

‎src/components/Breadcrumbs/index.astro‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ const breadcrumbSchema =
5858
)}
5959

6060
{item.isCurrentPage ? (
61-
<span class="text-text font-medium" aria-current="page">
61+
<span class="text-content font-medium" aria-current="page">
6262
{item.label}
6363
</span>
6464
) : (

‎src/components/BugReporter/index.astro‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@ const {
2929
<dialog
3030
id={dialogId}
3131
aria-label="Report a bug"
32-
class="bg-content-inverse text-text border border-border rounded-md p-4 max-w-xl w-[min(42rem,90vw)]"
32+
class="bg-content-inverse text-content border border-border rounded-md p-4 max-w-xl w-[min(42rem,90vw)]"
3333
>
3434
<div class="flex items-start justify-between gap-4">
3535
<h2 class="text-xl font-bold">Report a bug</h2>
3636
<button
3737
id={closeButtonId}
3838
type="button"
39-
class="text-text underline decoration-dotted decoration-text underline-offset-4 hover:text-secondary hover:decoration-secondary focus:text-secondary focus:decoration-secondary focus:outline-none"
39+
class="text-content underline decoration-dotted decoration-text underline-offset-4 hover:text-secondary hover:decoration-secondary focus:text-secondary focus:decoration-secondary focus:outline-none"
4040
>
4141
Close
4242
</button>
@@ -52,7 +52,7 @@ const {
5252
<input
5353
name="name"
5454
autocomplete="name"
55-
class="mt-1 w-full rounded-md border border-border bg-content-inverse-offset text-text p-2"
55+
class="mt-1 w-full rounded-md border border-border bg-content-inverse-offset text-content p-2"
5656
placeholder="Your name"
5757
/>
5858
</label>
@@ -63,7 +63,7 @@ const {
6363
name="email"
6464
type="email"
6565
autocomplete="email"
66-
class="mt-1 w-full rounded-md border border-border bg-content-inverse-offset text-text p-2"
66+
class="mt-1 w-full rounded-md border border-border bg-content-inverse-offset text-content p-2"
6767
placeholder="your.email@example.org"
6868
/>
6969
</label>
@@ -74,25 +74,25 @@ const {
7474
name="message"
7575
required
7676
rows="5"
77-
class="mt-1 w-full rounded-md border border-border bg-content-inverse-offset text-text p-2"
77+
class="mt-1 w-full rounded-md border border-border bg-content-inverse-offset text-content p-2"
7878
placeholder="What's the bug? What did you expect?"
7979
></textarea>
8080
</label>
8181

82-
<p id={statusId} class="mt-3 text-text hidden" aria-live="polite"></p>
82+
<p id={statusId} class="mt-3 text-content hidden" aria-live="polite"></p>
8383

8484
<div class="mt-4 flex items-center gap-3">
8585
<button
8686
type="submit"
87-
class="inline-flex items-center justify-center rounded-md px-4 py-2 bg-secondary text-content-inverse hover:opacity-90 focus:outline-none disabled:opacity-60"
87+
class="inline-flex items-center justify-center rounded-md px-4 py-2 bg-spotlight text-content-inverse hover:opacity-90 focus:outline-none disabled:opacity-60"
8888
>
8989
Send
9090
</button>
9191

9292
<button
9393
id={cancelButtonId}
9494
type="button"
95-
class="text-text underline decoration-dotted decoration-text underline-offset-4 hover:text-secondary hover:decoration-secondary focus:text-secondary focus:decoration-secondary focus:outline-none"
95+
class="text-content underline decoration-dotted decoration-text underline-offset-4 hover:text-secondary hover:decoration-secondary focus:text-secondary focus:decoration-secondary focus:outline-none"
9696
>
9797
Cancel
9898
</button>

‎src/components/Calendar/index.astro‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const { ...rest } = Astro.props
99
type="button"
1010
data-calendar-trigger
1111
aria-expanded="false"
12-
class="inline-flex items-center text-text underline decoration-dotted decoration-text underline-offset-4 hover:text-secondary hover:decoration-secondary focus:text-secondary focus:decoration-secondary focus:outline-none [&_.icon]:fill-text! [&_.icon]:stroke-text! hover:[&_.icon]:fill-secondary! hover:[&_.icon]:stroke-secondary! focus:[&_.icon]:fill-secondary! focus:[&_.icon]:stroke-secondary!"
12+
class="inline-flex items-center text-content underline decoration-dotted decoration-text underline-offset-4 hover:text-secondary hover:decoration-secondary focus:text-secondary focus:decoration-secondary focus:outline-none [&_.icon]:fill-text! [&_.icon]:stroke-text! hover:[&_.icon]:fill-secondary! hover:[&_.icon]:stroke-secondary! focus:[&_.icon]:fill-secondary! focus:[&_.icon]:stroke-secondary!"
1313
>
1414
<span class="[&_.icon]:h-5 [&_.icon]:w-5">
1515
<Icon name="calendar-generic-ical" variant="inherit" />
@@ -19,7 +19,7 @@ const { ...rest } = Astro.props
1919

2020
<div
2121
data-calendar-menu
22-
class="hidden mt-2 border border-border rounded-md bg-content-inverse text-text p-3 w-[min(22rem,90vw)]"
22+
class="hidden mt-2 border border-border rounded-md bg-content-inverse text-content p-3 w-[min(22rem,90vw)]"
2323
role="menu"
2424
aria-label="Add this event to your calendar"
2525
>
@@ -28,7 +28,7 @@ const { ...rest } = Astro.props
2828
data-calendar-link="google"
2929
href="https://calendar.google.com/calendar/render"
3030
rel="noopener"
31-
class="flex items-center text-text underline decoration-dotted decoration-text underline-offset-4 hover:text-secondary hover:decoration-secondary focus:text-secondary focus:decoration-secondary focus:outline-none [&_.icon]:fill-text! [&_.icon]:stroke-text! hover:[&_.icon]:fill-secondary! hover:[&_.icon]:stroke-secondary! focus:[&_.icon]:fill-secondary! focus:[&_.icon]:stroke-secondary!"
31+
class="flex items-center text-content underline decoration-dotted decoration-text underline-offset-4 hover:text-secondary hover:decoration-secondary focus:text-secondary focus:decoration-secondary focus:outline-none [&_.icon]:fill-text! [&_.icon]:stroke-text! hover:[&_.icon]:fill-secondary! hover:[&_.icon]:stroke-secondary! focus:[&_.icon]:fill-secondary! focus:[&_.icon]:stroke-secondary!"
3232
>
3333
<span class="[&_.icon]:h-5 [&_.icon]:w-5">
3434
<Icon name="calendar-google" variant="inherit" />
@@ -40,7 +40,7 @@ const { ...rest } = Astro.props
4040
data-calendar-link="outlook"
4141
href="https://outlook.office.com/calendar/0/deeplink/compose"
4242
rel="noopener"
43-
class="flex items-center text-text underline decoration-dotted decoration-text underline-offset-4 hover:text-secondary hover:decoration-secondary focus:text-secondary focus:decoration-secondary focus:outline-none [&_.icon]:fill-text! [&_.icon]:stroke-text! hover:[&_.icon]:fill-secondary! hover:[&_.icon]:stroke-secondary! focus:[&_.icon]:fill-secondary! focus:[&_.icon]:stroke-secondary!"
43+
class="flex items-center text-content underline decoration-dotted decoration-text underline-offset-4 hover:text-secondary hover:decoration-secondary focus:text-secondary focus:decoration-secondary focus:outline-none [&_.icon]:fill-text! [&_.icon]:stroke-text! hover:[&_.icon]:fill-secondary! hover:[&_.icon]:stroke-secondary! focus:[&_.icon]:fill-secondary! focus:[&_.icon]:stroke-secondary!"
4444
>
4545
<span class="[&_.icon]:h-5 [&_.icon]:w-5">
4646
<Icon name="calendar-outlook" variant="inherit" />
@@ -51,7 +51,7 @@ const { ...rest } = Astro.props
5151
<button
5252
type="button"
5353
data-calendar-download-ics
54-
class="flex items-center text-text underline decoration-dotted decoration-text underline-offset-4 hover:text-secondary hover:decoration-secondary focus:text-secondary focus:decoration-secondary focus:outline-none [&_.icon]:fill-text! [&_.icon]:stroke-text! hover:[&_.icon]:fill-secondary! hover:[&_.icon]:stroke-secondary! focus:[&_.icon]:fill-secondary! focus:[&_.icon]:stroke-secondary!"
54+
class="flex items-center text-content underline decoration-dotted decoration-text underline-offset-4 hover:text-secondary hover:decoration-secondary focus:text-secondary focus:decoration-secondary focus:outline-none [&_.icon]:fill-text! [&_.icon]:stroke-text! hover:[&_.icon]:fill-secondary! hover:[&_.icon]:stroke-secondary! focus:[&_.icon]:fill-secondary! focus:[&_.icon]:stroke-secondary!"
5555
>
5656
<span class="[&_.icon]:h-5 [&_.icon]:w-5">
5757
<Icon name="calendar_apple" variant="inherit" />

‎src/components/CallToAction/Download/README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ The component uses CSS custom properties for theming:
7171

7272
- `--color-primary`: Primary brand color
7373
- `--color-accent`: Accent color for gradients
74-
- `--color-text`: Text color (used for button text)
74+
- `--color-content`: Text color (used for button text)
7575

7676
### Layout
7777

‎src/components/CallToAction/Featured/index.astro‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ const titleId = `${id}-title`
6666
<div class="max-w-xl">
6767
<h3
6868
id={titleId}
69-
class="text-2xl md:text-3xl lg:text-4xl font-bold text-text mb-4 leading-tight"
69+
class="text-2xl md:text-3xl lg:text-4xl font-bold text-content mb-4 leading-tight"
7070
>
7171
{title}
7272
</h3>

‎src/components/CallToAction/Newsletter/index.astro‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ const {
5454
></path>
5555
</svg>
5656
</div>
57-
<h2 class="text-2xl md:text-3xl lg:text-4xl font-bold text-text mb-4">
57+
<h2 class="text-2xl md:text-3xl lg:text-4xl font-bold text-content mb-4">
5858
{title}
5959
</h2>
6060
<p class="text-base md:text-lg text-text-offset max-w-2xl mx-auto leading-relaxed">
@@ -79,7 +79,7 @@ const {
7979
id="newsletter-email"
8080
name="email"
8181
placeholder={placeholder}
82-
class="w-full px-6 py-4 border-2 border-border rounded-xl bg-content-inverse text-text placeholder:text-text-offset focus:border-primary focus:ring-0 focus:outline-none transition-colors duration-200"
82+
class="w-full px-6 py-4 border-2 border-border rounded-xl bg-content-inverse text-content placeholder:text-text-offset focus:border-primary focus:ring-0 focus:outline-none transition-colors duration-200"
8383
required
8484
aria-describedby="newsletter-message"
8585
/>
@@ -89,7 +89,7 @@ const {
8989
type="submit"
9090
id="newsletter-submit"
9191
data-e2e-state="idle"
92-
class="px-8 py-4 bg-primary hover:bg-primary-hover text-white font-semibold rounded-xl transition-all duration-200 hover:shadow-lg hover:-translate-y-0.5 whitespace-nowrap disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:translate-y-0"
92+
class="px-8 py-4 bg-spotlight hover:bg-spotlight-offset text-white font-semibold rounded-xl transition-all duration-200 hover:shadow-lg hover:-translate-y-0.5 whitespace-nowrap disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:translate-y-0"
9393
>
9494
<span id="button-text">{buttonText}</span>
9595
<svg

‎src/components/Carousel/index.astro‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ const carouselId = `carousel-${type}-${variant}-${currentSlug}`
7171
</div>
7272
)}
7373
<div class="p-6 pt-2">
74-
<h3 class="text-xl font-semibold text-text mb-3 group-hover:text-primary transition-colors">
74+
<h3 class="text-xl font-semibold text-content mb-3 group-hover:text-primary transition-colors">
7575
{item.data.title}
7676
</h3>
7777
{item.data.description && (
@@ -106,7 +106,7 @@ const carouselId = `carousel-${type}-${variant}-${currentSlug}`
106106
{/* Navigation Buttons */}
107107
<button
108108
type="button"
109-
class="embla__button embla__button--prev absolute left-0 top-1/2 -translate-y-1/2 -translate-x-4 w-12 h-12 rounded-full bg-content-inverse border-2 border-border shadow-lg hover:bg-primary hover:border-primary transition-all duration-300 flex items-center justify-center z-10 disabled:opacity-30 disabled:cursor-not-allowed"
109+
class="embla__button embla__button--prev absolute left-0 top-1/2 -translate-y-1/2 -translate-x-4 w-12 h-12 rounded-full bg-content-inverse border-2 border-border shadow-lg hover:bg-spotlight hover:border-primary transition-all duration-300 flex items-center justify-center z-10 disabled:opacity-30 disabled:cursor-not-allowed"
110110
aria-label="Previous slide"
111111
data-carousel-prev
112112
>
@@ -129,7 +129,7 @@ const carouselId = `carousel-${type}-${variant}-${currentSlug}`
129129

130130
<button
131131
type="button"
132-
class="embla__button embla__button--next absolute right-0 top-1/2 -translate-y-1/2 translate-x-4 w-12 h-12 rounded-full bg-content-inverse border-2 border-border shadow-lg hover:bg-primary hover:border-primary transition-all duration-300 flex items-center justify-center z-10 disabled:opacity-30 disabled:cursor-not-allowed"
132+
class="embla__button embla__button--next absolute right-0 top-1/2 -translate-y-1/2 translate-x-4 w-12 h-12 rounded-full bg-content-inverse border-2 border-border shadow-lg hover:bg-spotlight hover:border-primary transition-all duration-300 flex items-center justify-center z-10 disabled:opacity-30 disabled:cursor-not-allowed"
133133
aria-label="Next slide"
134134
data-carousel-next
135135
>

‎src/components/Consent/Banner/index.astro‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import CookieSvg from '@assets/images/site/cookie.svg'
2121
<button
2222
type="button"
2323
aria-label="Close cookie consent"
24-
class="consent-modal__close-btn bg-secondary border-none text-text flex p-1.5 absolute top-0 right-0 transition-all duration-150 ease-in-out hover:bg-secondary-offset hover:text-text focus:bg-secondary-offset focus:text-text focus:outline-none z-10"
24+
class="consent-modal__close-btn bg-spotlight border-none text-content flex p-1.5 absolute top-0 right-0 transition-all duration-150 ease-in-out hover:bg-spotlight-offset hover:text-content focus:bg-spotlight-offset focus:text-content focus:outline-none z-10"
2525
>
2626
<Icon name="close" class="h-8 w-8" />
2727
</button>

0 commit comments

Comments
 (0)