w3c / w3c/csswg-drafts

[css-inline] Draft line-box-contain proposal

Open
#3,199 9 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

css-inline-3
Dominant language
Bikeshed
Stars
4.9k
Forks
816
PR merge metrics
PR metrics pending

Description

@dbaron had a proposal called line-box-contain for controlling how line box heights are calculated. Some aspects of this feature probably need to be revived if we're going to have baseline-to-baseline distances that aren't wiggly in simple cases like a single-font-size paragraph mixing proportional and monospace text.

Proposed values need to include:

  • current behavior value ('normal'? 'legacy'?)
  • value that ignores > 1em line-height values on anything other than the root inline box (slightly more conservative approach than dbaron's proposal to only use the root inline) so that the line box only grows if its contents actually extend outside the outer leading edges of the root inline
  • possibly an “absolute” value that does use only the root inline? This can introduce content overlap...
  • quirks mode value?
  • anything else?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the issue's description and dbaron's linked css-line-spacing explainer. Work out which proposed values are needed, including current behavior, conservative and absolute handling, quirks mode, and any other cases, then resolve the line-box-contain behavior through the CSS Working Group process and document the agreed proposal.

Written by the indexing model from the issue text.

Assessment

Tech stack
css
Domain
frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.