Skip to content

Register 104 draft CSS properties - #622

Draft
davesnx wants to merge 7 commits into
css-grammar-gapsfrom
css-grammar-draft-properties
Draft

davesnx wants to merge 7 commits into
css-grammar-gapsfrom
css-grammar-draft-properties

Conversation

@davesnx

@davesnx davesnx commented Sep 25, 2026 •

Copy link
Copy Markdown
Owner

Registers 104 CSS properties that are in W3C drafts but css-grammar did not know. Most are not implemented in any browser yet; writing them in [%css] was an unknown-property error before.

Spec group Count Examples
CSS Fill and Stroke 3 16 fill-color, fill-image, stroke-image
GCPM, Regions, Spatial Navigation, Forms, Image Animation, Page Floats 19 bookmark-level, flow-into, region-fragment, spatial-navigation-action, float-defer
Borders and Box Decorations 4 25 per-side border-*-radius shorthands, border-limit, border-*-clip, box-shadow-* longhands
Text 4, Text Decoration 4, Lists 3 8
Inline Layout, Box Sizing, Rhythmic Sizing, Line Grid, Round Display, Fragmentation, Shapes 19 block-step-*, line-grid, line-snap
Backgrounds 4, Overflow 4 16 overflow-clip-margin-*; overflow-clip-margin becomes a Shorthand of its four sides
Gaps 1 1 column-rule-inset-start

Each property has its spec grammar with a citation, the right kind (Property, Shorthand with direct longhands, or Alias), a runtime type, valid and invalid css-grammar cases, and a css-support cram test per spec group. New families get Slot_key.seed entries at the end.

Not added, with the reason in CHANGES.md: 4 names that no spec defines as properties, 7 non-normative SVG stroke and marker properties, 17 corner-* properties that need a new value type, 6 withdrawn item-* properties, link-parameters (needs <param()>) and text-spacing (deeply nested grammar, no tests in the spec). box-shadow itself keeps its current grammar; the Borders 4 redefinition needs its own change.

Checks at 1ca5ba6: make build, make format-check, make test and DUNE_PROFILE=release make test pass.

Stacked on #621.

Risk: two-way door. A revert makes these properties unknown again and returns overflow-clip-margin to a plain property.

@coderabbitai

coderabbitai Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


Comment @coderabbitai help to get the list of available commands.

@vercel

vercel Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
styled-ppx Ready Ready Preview Sep 30, 2026 2:02pm UTC

Request Review

* css-grammar-gaps:
  State design reasons in slot-key and class-format comments and remove the scratch measure tool
  Rename class prefixes to a-, in-, id- and k-, and key !important by context so CSS.merge needs no importance check
  Prefix interpolation bundles with csv- and reject atom class collisions in generate
* css-grammar-gaps:
  Bundle only interpolated declarations that share a variable, so the others merge as keyed atoms
  Rename class prefixes to _a_, _in_, _id_ and _k_ so hand-written a- classes are never read as atoms
  Emit cascade tiers so conditional rules beat base rules, own rules beat descendant defaults and globals, across stylesheets
  Give a lone interpolated declaration a keyed atom class so CSS.merge resolves it
  Hash atoms from their resolved selector so $(binding) references in different modules mint different classes
  Show every CSS.merge combination in the melange demo
  Encode context, family and longhand mask in atom class names and resolve CSS.merge conflicts by them
  Group declarations whose longhands overlap into one atom, in author order
* css-grammar-gaps:
  Keep parent-to-child rules in their context tier and sort each tier by descendant shape, then shorthand depth
  Describe the final class-name prefixes in the 0.62.0 changelog

# Conflicts:
#	CHANGES.md
* css-grammar-gaps:
  Resolve property aliases before computing an atom's longhand mask
Register max-size, min-size and the logical border radius shorthands as plain properties so no existing class changes, follow css-inline-3 for line-fit-edge, print the generated output in the new tests, and name CSS Borders 4 as the source of the excluded corner-* properties.

This branch was successfully deployed

1 active deployment
Preview — 2ade55e2 Deployed Sep 30, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant