gbs-add-block 2.0.3 → 2.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -134,7 +134,26 @@ Do not use `!important`, and do not write selectors against internal class names
|
|
|
134
134
|
(`.bt-root`, `.dg-cell`) in app CSS — they are implementation detail. Use the
|
|
135
135
|
variables or the slots.
|
|
136
136
|
|
|
137
|
-
## 5.
|
|
137
|
+
## 5. Unlayered resets (Bootstrap, Normalize)
|
|
138
|
+
|
|
139
|
+
Component rules sit in `@layer components`. Any stylesheet that ships
|
|
140
|
+
**unlayered** beats every layered rule regardless of specificity — the cascade
|
|
141
|
+
settles layers before specificity. So Bootstrap's Reboot (`button { border-radius: 0 }`,
|
|
142
|
+
`button, input, textarea { font-size: inherit }`) overrides our classes, and
|
|
143
|
+
import order does not help.
|
|
144
|
+
|
|
145
|
+
Fix it in the project's global CSS by giving the reset its own layer, declared
|
|
146
|
+
before `components`:
|
|
147
|
+
|
|
148
|
+
```css
|
|
149
|
+
@layer bootstrap, theme, base, components, utilities;
|
|
150
|
+
@import url("bootstrap/dist/css/bootstrap.min.css") layer(bootstrap);
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
Only components whose root is a native form element are affected (Button,
|
|
154
|
+
Textarea). Class names never collide — ours are two-letter prefixed.
|
|
155
|
+
|
|
156
|
+
## 6. State attributes
|
|
138
157
|
|
|
139
158
|
Components expose their state as `data-*` attributes, so you can style states
|
|
140
159
|
without tracking them in React.
|
|
@@ -155,7 +174,7 @@ without tracking them in React.
|
|
|
155
174
|
.cb-option[data-active] { outline: 2px solid var(--gbs-focus); }
|
|
156
175
|
```
|
|
157
176
|
|
|
158
|
-
##
|
|
177
|
+
## 7. Dark mode
|
|
159
178
|
|
|
160
179
|
Colours are `light-dark()` pairs driven by the page's `color-scheme`, so the
|
|
161
180
|
default is whatever the device prefers. To pin it, set `color-scheme` — the
|
|
@@ -174,7 +193,7 @@ Do not maintain a second palette for dark mode. Override the `--gbs-*` variables
|
|
|
174
193
|
with `light-dark()` pairs, or set them inside your own `[data-theme="dark"]`
|
|
175
194
|
block, and every component follows.
|
|
176
195
|
|
|
177
|
-
##
|
|
196
|
+
## 8. Right-to-left
|
|
178
197
|
|
|
179
198
|
The components use logical properties and read `dir` from the document, so RTL
|
|
180
199
|
works without configuration. Arrow keys in Menu, Switch and Tabs mirror
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# GBS Building Blocks 2.0 (v2.0.
|
|
1
|
+
# GBS Building Blocks 2.0 (v2.0.4)
|
|
2
2
|
|
|
3
3
|
Latest and upgraded version of GBS building blocks with headless UI and removed dependencies.
|
|
4
4
|
|
|
@@ -33,13 +33,13 @@ Pick a subset with `--for claude,codex`, or `--for none` for just `.gbs/`.
|
|
|
33
33
|
Commit the result so everyone's agent picks it up. Re-run to update; a file you
|
|
34
34
|
have edited is never replaced without `--force`.
|
|
35
35
|
|
|
36
|
-
## What's New 🎉 (Ver 2.0.
|
|
36
|
+
## What's New 🎉 (Ver 2.0.4)
|
|
37
37
|
|
|
38
|
-
- Agent skill:
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
38
|
+
- Agent skill: added guidance for projects that load an unlayered CSS reset
|
|
39
|
+
such as Bootstrap or Normalize. Component rules live in the `components`
|
|
40
|
+
cascade layer, and an unlayered reset outranks every layered rule whatever
|
|
41
|
+
its selectors look like, so Bootstrap's Reboot was restyling the Button.
|
|
42
|
+
Importing the reset into its own layer fixes it; the skill now says so.
|
|
43
43
|
|
|
44
44
|
## Authors
|
|
45
45
|
|