Skip to content

Commit 1065d8f

Browse files
committed
Refactor text-text-offset and text-text Tailwind styles to text-content-offset and text-content
1 parent 7667769 commit 1065d8f

52 files changed

Lines changed: 342 additions & 219 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.

‎_TODO.md‎

Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,3 +80,126 @@ window.addEventListener('afterprint', (event) => {
8080
// You can also use this event to send an AJAX request to a server for print tracking.
8181
})
8282
```
83+
84+
or listen for changes:
85+
86+
```typescript
87+
if (window.matchMedia) {
88+
var mediaQueryList = window.matchMedia('print');
89+
mediaQueryList.addListener(function(mql) {
90+
if (mql.matches) {
91+
// Equivalent to onbeforeprint
92+
console.log('Entering print mode (before print dialog)');
93+
} else {
94+
// Equivalent to onafterprint
95+
console.log('Exiting print mode (after print dialog)');
96+
}
97+
});
98+
}
99+
```
100+
101+
```bash
102+
1) [mobile-chrome] › test/e2e/specs/01-smoke/critical-paths.spec.ts:38:3 › Critical Paths @smoke › @ready mobile navigation works across main pages
103+
104+
TimeoutError: page.waitForFunction: Timeout 15000ms exceeded.
105+
106+
at ../helpers/pageObjectModels/BasePage.ts:263
107+
108+
261 | }
109+
262 |
110+
> 263 | await this._page.waitForFunction(
111+
| ^
112+
264 | () => {
113+
265 | const header = document.getElementById('header')
114+
266 | const menu = document.querySelector('.main-nav-menu')
115+
at BasePage.openMobileMenu (/home/kevin/Repos/WebstackBuilders/CorporateWebsite/astro.webstackbuilders.com/test/e2e/helpers/pageObjectModels/BasePage.ts:263:22)
116+
at /home/kevin/Repos/WebstackBuilders/CorporateWebsite/astro.webstackbuilders.com/test/e2e/specs/01-smoke/critical-paths.spec.ts:53:7
117+
118+
attachment #1: screenshot (image/png) ──────────────────────────────────────────────────────────
119+
.cache/playwright/output/01-smoke-critical-paths-Cr-fda54-ion-works-across-main-pages-mobile-chrome/test-failed-1.png
120+
────────────────────────────────────────────────────────────────────────────────────────────────
121+
122+
Error Context: .cache/playwright/output/01-smoke-critical-paths-Cr-fda54-ion-works-across-main-pages-mobile-chrome/error-context.md
123+
124+
2) [mobile-safari] › test/e2e/specs/01-smoke/critical-paths.spec.ts:114:3 › Critical Paths @smoke › @ready main pages have no errors
125+
126+
Error: expect(received).toHaveLength(expected)
127+
128+
Expected length: 0
129+
Received length: 1
130+
Received array: [[Fetch API cannot load http: /localhost:4321/offline due to access control checks.]]
131+
132+
at ../helpers/pageObjectModels/BasePage.ts:665
133+
134+
663 | const errors = await this._page.pageErrors()
135+
664 | const filteredErrors = errors.filter((error) => !this.isIgnorablePageError(error))
136+
> 665 | expect(filteredErrors).toHaveLength(0)
137+
| ^
138+
666 | return filteredErrors
139+
667 | }
140+
668 |
141+
at BasePage.expectNoErrors (/home/kevin/Repos/WebstackBuilders/CorporateWebsite/astro.webstackbuilders.com/test/e2e/helpers/pageObjectModels/BasePage.ts:665:28)
142+
at /home/kevin/Repos/WebstackBuilders/CorporateWebsite/astro.webstackbuilders.com/test/e2e/specs/01-smoke/critical-paths.spec.ts:118:7
143+
144+
attachment #1: screenshot (image/png) ──────────────────────────────────────────────────────────
145+
.cache/playwright/output/01-smoke-critical-paths-Cr-4a53f-y-main-pages-have-no-errors-mobile-safari/test-failed-1.png
146+
────────────────────────────────────────────────────────────────────────────────────────────────
147+
148+
Error Context: .cache/playwright/output/01-smoke-critical-paths-Cr-4a53f-y-main-pages-have-no-errors-mobile-safari/error-context.md
149+
150+
2 failed
151+
[mobile-chrome] › test/e2e/specs/01-smoke/critical-paths.spec.ts:38:3 › Critical Paths @smoke › @ready mobile navigation works across main pages
152+
[mobile-safari] › test/e2e/specs/01-smoke/critical-paths.spec.ts:114:3 › Critical Paths @smoke › @ready main pages have no errors
153+
154+
155+
156+
1) [webkit] › test/e2e/specs/01-smoke/dynamic-pages.spec.ts:171:3 › Dynamic Pages @smoke › @ready dynamic pages have no console errors
157+
158+
Error: expect(received).toHaveLength(expected)
159+
160+
Expected length: 0
161+
Received length: 1
162+
Received array: ["Failed to load resource: the server responded with a status of 403 (Forbidden)"]
163+
164+
192 |
165+
193 | // Fail if there are any unexpected 404s or errors
166+
> 194 | expect(errorChecker.getFilteredErrors()).toHaveLength(0)
167+
| ^
168+
195 | expect(errorChecker.getFiltered404s()).toHaveLength(0)
169+
196 | })
170+
197 | })
171+
at /home/kevin/Repos/WebstackBuilders/CorporateWebsite/astro.webstackbuilders.com/test/e2e/specs/01-smoke/dynamic-pages.spec.ts:194:46
172+
173+
attachment #1: screenshot (image/png) ──────────────────────────────────────────────────────────
174+
.cache/playwright/output/01-smoke-dynamic-pages-Dyn-8a015-ages-have-no-console-errors-webkit/test-failed-1.png
175+
────────────────────────────────────────────────────────────────────────────────────────────────
176+
177+
Error Context: .cache/playwright/output/01-smoke-dynamic-pages-Dyn-8a015-ages-have-no-console-errors-webkit/error-context.md
178+
179+
2) [mobile-safari] › test/e2e/specs/01-smoke/dynamic-pages.spec.ts:171:3 › Dynamic Pages @smoke › @ready dynamic pages have no console errors
180+
181+
Error: expect(received).toHaveLength(expected)
182+
183+
Expected length: 0
184+
Received length: 1
185+
Received array: ["Failed to load resource: the server responded with a status of 403 (Forbidden)"]
186+
187+
192 |
188+
193 | // Fail if there are any unexpected 404s or errors
189+
> 194 | expect(errorChecker.getFilteredErrors()).toHaveLength(0)
190+
| ^
191+
195 | expect(errorChecker.getFiltered404s()).toHaveLength(0)
192+
196 | })
193+
197 | })
194+
at /home/kevin/Repos/WebstackBuilders/CorporateWebsite/astro.webstackbuilders.com/test/e2e/specs/01-smoke/dynamic-pages.spec.ts:194:46
195+
196+
attachment #1: screenshot (image/png) ──────────────────────────────────────────────────────────
197+
.cache/playwright/output/01-smoke-dynamic-pages-Dyn-8a015-ages-have-no-console-errors-mobile-safari/test-failed-1.png
198+
────────────────────────────────────────────────────────────────────────────────────────────────
199+
200+
Error Context: .cache/playwright/output/01-smoke-dynamic-pages-Dyn-8a015-ages-have-no-console-errors-mobile-safari/error-context.md
201+
202+
2 failed
203+
[webkit] › test/e2e/specs/01-smoke/dynamic-pages.spec.ts:171:3 › Dynamic Pages @smoke › @ready dynamic pages have no console errors
204+
[mobile-safari] › test/e2e/specs/01-smoke/dynamic-pages.spec.ts:171:3 › Dynamic Pages @smoke › @ready dynamic pages have no console errors
205+
```

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ const {
5757
<h2 class="text-2xl md:text-3xl lg:text-4xl font-bold text-content mb-4">
5858
{title}
5959
</h2>
60-
<p class="text-base md:text-lg text-text-offset max-w-2xl mx-auto leading-relaxed">
60+
<p class="text-base md:text-lg text-content-active max-w-2xl mx-auto leading-relaxed">
6161
{description}
6262
</p>
6363
</div>
@@ -70,7 +70,7 @@ const {
7070
<label
7171
id="newsletter-email-label"
7272
for="newsletter-email"
73-
class="text-sm font-medium text-text"
73+
class="text-sm font-medium text-content"
7474
>
7575
Email address
7676
</label>
@@ -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-content 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-content-active focus:border-primary focus:ring-0 focus:outline-none transition-colors duration-200"
8383
required
8484
aria-describedby="newsletter-message"
8585
/>
@@ -145,7 +145,7 @@ const {
145145
<!-- Status Message -->
146146
<p
147147
id="newsletter-message"
148-
class="text-sm text-text-offset text-center"
148+
class="text-sm text-content-active text-center"
149149
role="status"
150150
aria-live="polite"
151151
aria-atomic="true"

‎src/components/Carousel/index.astro‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ const carouselId = `carousel-${type}-${variant}-${currentSlug}`
3535
<carousel-slider data-carousel class="block">
3636
<section class="max-w-6xl mx-auto px-4 sm:px-6 lg:px-8 py-16">
3737
<header class="text-center mb-12">
38-
<h2 id={`${carouselId}-title`} class="text-3xl md:text-4xl font-bold text-text">
38+
<h2 id={`${carouselId}-title`} class="text-3xl md:text-4xl font-bold text-content">
3939
{title}
4040
</h2>
4141
</header>
@@ -111,7 +111,7 @@ const carouselId = `carousel-${type}-${variant}-${currentSlug}`
111111
data-carousel-prev
112112
>
113113
<svg
114-
class="w-6 h-6 text-text"
114+
class="w-6 h-6 text-content"
115115
fill="none"
116116
stroke="currentColor"
117117
viewBox="0 0 24 24"
@@ -134,7 +134,7 @@ const carouselId = `carousel-${type}-${variant}-${currentSlug}`
134134
data-carousel-next
135135
>
136136
<svg
137-
class="w-6 h-6 text-text"
137+
class="w-6 h-6 text-content"
138138
fill="none"
139139
stroke="currentColor"
140140
viewBox="0 0 24 24"

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ const {
4747
class="border-2 border-border rounded mt-0.5 h-5 w-5 shrink-0 cursor-pointer focus:outline-2 focus:outline-offset-2 focus:outline-primary checked:bg-spotlight checked:border-primary"
4848
/>
4949
<span id={`${id}-label`} class="sr-only">Consent to data processing</span>
50-
<span id={`${id}-description`} class="flex-1 text-sm leading-relaxed text-text">
50+
<span id={`${id}-description`} class="flex-1 text-sm leading-relaxed text-content">
5151
{
5252
customText ? (
5353
<Fragment set:html={customText} />

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import logoSvg from '@assets/images/site/logo.svg'
1212
<div class="px-6 py-4 flex items-center justify-between border-b border-page-base-offset">
1313
<div class="flex items-center gap-4">
1414
<Image src={logoSvg} alt="Webstack Builders corporate logo." class="h-8 w-auto" />
15-
<h2 id="consent-preferences__title" class="text-2xl font-bold text-text">
15+
<h2 id="consent-preferences__title" class="text-2xl font-bold text-content">
1616
Privacy Preference Center
1717
</h2>
1818
</div>
@@ -21,7 +21,7 @@ import logoSvg from '@assets/images/site/logo.svg'
2121
<div class="px-6 py-8">
2222
{/* Introduction */}
2323
<div class="mb-8">
24-
<p id="consent-preferences__settings-desc" class="text-text-muted leading-relaxed">
24+
<p id="consent-preferences__settings-desc" class="text-content-muted leading-relaxed">
2525
When you visit our website, we may store information in your browser or device to make the
2626
site work and provide a better experience. This includes both cookies and local storage.
2727
The information we collect might relate to you, your preferences, or your device. You can

‎src/components/Copy/index.astro‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ const floatButtonClass =
4545
4646
const iconButtonColorClass = [
4747
'text-content fill-content',
48-
'hover:text-text-offset hover:fill-content-active',
49-
'focus-visible:text-text-offset focus-visible:fill-content-active',
48+
'hover:text-content-active hover:fill-content-active',
49+
'focus-visible:text-content-active focus-visible:fill-content-active',
5050
'cursor-pointer',
5151
].join(' ')
5252
---

‎src/components/Errors/NotFoundHero/index.astro‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ const {
1717
---
1818

1919
<div class="mb-8 text-center">
20-
<h1 class="text-9xl font-bold text-text-muted mb-4">{heading}</h1>
20+
<h1 class="text-9xl font-bold text-content-muted mb-4">{heading}</h1>
2121
<h2 class="text-3xl md:text-4xl font-bold text-content mb-4">{subheading}</h2>
22-
<p class="text-lg text-text-muted mb-8">
22+
<p class="text-lg text-content-muted mb-8">
2323
{description}
2424
</p>
2525
<div class="space-y-4">

‎src/components/Footer/index.astro‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ const year = new Date().getFullYear()
118118
>
119119
<div class="lg:hidden">Subscribe to</div>
120120
<span class="lg:font-bold lg:uppercase">Mailing List</span>
121-
<span class="hidden lg:block text-text">
121+
<span class="hidden lg:block text-content">
122122
Sign up to stay in touch and get great content
123123
</span>
124124
</a>
@@ -131,7 +131,7 @@ const year = new Date().getFullYear()
131131
class="text-content underline decoration-dotted decoration-content underline-offset-4 hover:text-secondary hover:decoration-secondary focus:text-secondary focus:decoration-secondary focus:outline-none"
132132
>
133133
<span class="lg:font-bold lg:uppercase">Consent</span>
134-
<span class="hidden lg:block text-text">
134+
<span class="hidden lg:block text-content">
135135
Manage your privacy preferences and data consent
136136
</span>
137137
</a>
@@ -142,7 +142,7 @@ const year = new Date().getFullYear()
142142
class="text-content underline decoration-dotted decoration-content underline-offset-4 hover:text-secondary hover:decoration-secondary focus:text-secondary focus:decoration-secondary focus:outline-none"
143143
>
144144
<span class="lg:font-bold lg:uppercase">Privacy Policy</span>
145-
<span class="hidden lg:block text-text">
145+
<span class="hidden lg:block text-content">
146146
Learn what data we collect and how we use it
147147
</span>
148148
</a>

0 commit comments

Comments
 (0)