w3c / w3c/csswg-drafts

[css-writing-modes] `glyph-orientation-vertical` is defined with invalid basic syntax

Open
#8,032 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

css-writing-modes-4
Dominant language
Bikeshed
Stars
4.9k
Forks
816
PR merge metrics
PR metrics pending

Description

Related: https://github.com/w3c/csswg-drafts/issues/2921#issuecomment-405376815

The value of glyph-orientation-vertical is defined with auto | 0deg | 90deg | 0 | 90.

Obviously, the numerical values are not keywords but <angle>s or <integer>s of the corresponding value in degrees. But CSS Values does not define the type to which the numeric values correspond, ie. it does not allow solution 3 below.

I see a few solutions:

  1. define glyph-orientation-vertical with auto | <angle [0,0]> | <angle [90deg,90deg]> | <integer [90,90]>, with numeric values being restricted in prose to degrees or unitless values (<angle> allows unitless value)
  2. extend/change the syntax of the bracketed range notation to [lower-upper] and [x,y,z], or something else
  3. extend the definition of CSS basic data types in CSS Values to allow writing numeric types literally

Solution 1 is a quick fix. Because glyph-orientation-vertical is obsolete, no solution may be worth it. But the CSS Properties and Values API may take advantage of solution 2 or 3, eg.:

@property --boolean {
  syntax: 0 | 1, /* Or <integer [0,1]> */
}

The bracketed range has proven to be problematic with dimensions. So my preference is solution 3 but it makes parsing syntax a bit more complex.

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 with the glyph-orientation-vertical property definition and the CSS Values component-types section, then read the linked CSSWG discussion and compare the three proposed syntax approaches. Done means the working-group decision is reflected consistently in the relevant spec text, including the treatment of numeric values and any CSS Properties and Values API implications.

Written by the indexing model from the issue text.

Assessment

Tech stack
css
Domain
documentation
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.