You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit ec5f730
Browse filesBrowse the repository at this point in the historyBrowse files
-`Style` extends `BaseStyle` and stores declarations in a map and nested selectors as children.
190
219
-`.select()` creates a child style using the parent selector + the new selector (with automatic spacing unless a combinator or `:` is used).
191
220
-`.media()` creates a sibling style under `@media(...)` and targets the current selector inside that media block.
192
-
-`.toCSS()` serializes rules in a deterministic order: normal selectors first, then `@media` blocks, preserving creation order via internal IDs.
221
+
-`.keyframes()` creates a named animation block whose children are unprefixed frame selectors.
222
+
-`.toCSS()` serializes each container in a deterministic order: normal selectors first, then `@media`, `@scope`, and `@keyframes` blocks, preserving creation order within each group via internal IDs.
193
223
-`.toPrettyCSS()` runs the output through Prettier (`parser: css`) with default formatting options.
194
224
195
225
## API Reference
@@ -204,6 +234,7 @@ Creates a `Style` instance. If a selector is provided, it becomes the root selec
204
234
-`css(object)` - set many properties at once using `CSSProps`.
205
235
-`select(selector)` - create or access a nested selector.
206
236
-`media(query)` - create or access a `@media(...)` block scoped to this selector.
237
+
-`keyframes(name)` - create or access a named animation; select its frames with `select()`.
207
238
-`use(style)` - shallow-merge declarations from another style into this one.
208
239
-`toCSS()` - serialize to CSS string.
209
240
-`toPrettyCSS(options?)` - serialize and format using Prettier.
`CSSProps` is a large type union of CSS properties used by `.css()` and property-specific methods on `Style`. It provides autocomplete and helps catch invalid property names or values.
287
319
320
+
## Maintaining Property Metadata
321
+
322
+
The generator combines the original `src/meta/cssProps.ts` with the handwritten
323
+
additions in `src/meta/cssProps2.ts`. Maintain new properties in `cssProps2.ts`
324
+
using the same `$`, `desc`, and optional `values.value` structure. Existing
325
+
properties, including vendor-prefixed and older names, remain available.
326
+
327
+
Regenerate the fluent methods and explicit property types from the repository root:
0 commit comments