Skip to content

Enable dominant-baseline, with modern values disabled behind pref - #535

Merged
Loirooriol merged 1 commit into
servo:mainfrom
Loirooriol:baseline
Nov 26, 2026
Merged

Loirooriol merged 1 commit into
servo:mainfrom
Loirooriol:baseline

Conversation

@Loirooriol

@Loirooriol Loirooriol commented Nov 24, 2026 •

Copy link
Copy Markdown
Collaborator

Removes the layout.css.dominant-baseline.enabled pref, thus enabling dominant-baseline by default.

Adds a new layout.css.baseline-metric.modern.enabled pref, which gates the modern values of dominant-baseline and alignment-baseline which didn't exist in CSS2.

These values were already disabled in alignment-baseline, but using conditional compilation instead of a pref.

Servo PR: servo/servo#50196

@mrobinson mrobinson changed the title Enable dominant-baseline, with moderm values disabled behind pref Enable dominant-baseline, with modern values disabled behind pref Nov 24, 2026
Removes the `layout.css.dominant-baseline.enabled` pref, thus enabling
`dominant-baseline` by default.

Adds a new `layout.css.baseline-metric.modern.enabled` pref, which gates
the modern values of `dominant-baseline` and `alignment-baseline` which
didn't exist in CSS2.

These values were already disabled in `alignment-baseline`, but using
conditional compilation instead of a pref.

Signed-off-by: Oriol Brufau <[email protected]>
Daniel-1600 pushed a commit to Daniel-1600/servo that referenced this pull request Nov 25, 2026
Bumps Stylo to servo/stylo#535

Adds support for:
 - `dominant-baseline: auto`
 - `dominant-baseline: text-top`
 - `dominant-baseline: text-bottom`
 - `dominant-baseline: middle`

Note that `auto` behaves as either `alphabetic` or `central`, so these
are also implemented using approximate heuristics, but won't parse. The
`central` approximation becomes the new default behavior for
non-sideways vertical writing modes, this is a change since previously
we were always using the `alphabetic` approximation.

Testing: Various tests improve. Some new failures because we don't set
presentational hints for SVG elements.
Fixes: servo#50189
Part of servo#2560

Signed-off-by: Oriol Brufau <[email protected]>
@Loirooriol
Loirooriol added this pull request to the merge queue Nov 26, 2026
Merged via the queue into servo:main with commit 23730cc Nov 26, 2026
6 checks passed
@Loirooriol
Loirooriol deleted the baseline branch November 26, 2026 10:13
staging-devin-ai-integration Bot pushed a commit to DioxusLabs/blitz that referenced this pull request Nov 28, 2026
- Handle DisplayOutside::InternalRuby and the ruby/webkit-box DisplayInside
  variants, now compiled for Servo (servo/stylo#539)
- Map the modern AlignmentBaseline values, now compiled for Servo behind
  layout.css.baseline-metric.modern.enabled (servo/stylo#535)
- Pass a per-document random() hasher key to Device::new (servo/stylo#520)
- Fill the new prefers-contrast/-reduced-motion/-reduced-transparency
  MediaData fields with NoPreference (servo/stylo#528)
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.

2 participants