Skip to content

Commit 61f41ba

Browse files
committed
docs: Fix CSS attribute quoting
The commit updates the CSS files to use single quotes for attribute selectors. This ensures consistency and avoids potential issues with double quotes in attribute values.
1 parent 8ed1eba commit 61f41ba

File tree

2 files changed

+28
-7
lines changed

2 files changed

+28
-7
lines changed

packages/ui/src/styles/bible-reader.css

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* #region Bible Reader */
2-
[data-slot="yv-bible-renderer"] {
2+
[data-slot='yv-bible-renderer'] {
33
/* Makes it where cascading styles from the parent app do not affect the bible reader */
44
all: unset;
55
--yv-reader-font-family: var(--font-sans), var(--font-serif);
@@ -69,7 +69,7 @@
6969
white-space: nowrap;
7070
}
7171

72-
&[data-show-verse-numbers="false"] .yv-vlbl {
72+
&[data-show-verse-numbers='false'] .yv-vlbl {
7373
@apply yv:hidden;
7474
}
7575

@@ -841,13 +841,13 @@
841841
}
842842

843843
/* RTL Support */
844-
&[dir="rtl"] {
844+
&[dir='rtl'] {
845845
direction: rtl;
846846
text-align: right;
847847
}
848848

849-
&[dir="rtl"] .p,
850-
&[dir="rtl"] .m {
849+
&[dir='rtl'] .p,
850+
&[dir='rtl'] .m {
851851
text-align: right;
852852
}
853853
}

packages/ui/src/styles/global.css

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,29 @@
11
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;700&family=Source+Serif+Pro:wght@400;700&display=swap');
2-
/* Importing Tailwind this way opts us out of CSS layers (reasoning: https://github.com/tailwindlabs/tailwindcss/discussions/13188#discussion-6352337) */
3-
@import 'tailwindcss/theme.css' prefix(yv); /* The CSS linter error is a known issue and does not affect functionality */
2+
3+
/*
4+
* Tailwind v4 CSS Layer Opt-Out
5+
* ==============================
6+
* By default, Tailwind v4 wraps styles in CSS @layer directives. This causes
7+
* specificity issues when consumers embed our SDK components alongside their
8+
* own CSS—the consumer's non-layered styles can unexpectedly override our
9+
* Tailwind utilities.
10+
*
11+
* Solution: Import Tailwind's CSS files separately instead of using
12+
* `@import 'tailwindcss'`. This is Tailwind's officially supported method
13+
* to opt out of CSS layers.
14+
*
15+
* The `prefix(yv)` ensures all Tailwind classes use a `yv-` prefix to avoid
16+
* collisions with consumer Tailwind setups.
17+
*
18+
* Reference: https://github.com/tailwindlabs/tailwindcss/discussions/13188
19+
*
20+
* Note: CSS linter warnings on these imports are a known issue and do not
21+
* affect functionality.
22+
*/
423
@import 'tailwindcss/preflight.css' prefix(yv);
24+
@import 'tailwindcss/theme.css' prefix(yv);
525
@import 'tailwindcss/utilities.css' prefix(yv);
26+
627
@import 'tw-animate-css';
728
@import './bible-reader.css';
829

0 commit comments

Comments
 (0)