Skip to content

Unify ListStyleType among Gecko and Servo#329

Merged
Loirooriol merged 1 commit intoservo:mainfrom
Loirooriol:list-style-type
Mar 11, 2026
Merged

Unify ListStyleType among Gecko and Servo#329
Loirooriol merged 1 commit intoservo:mainfrom
Loirooriol:list-style-type

Conversation

@Loirooriol
Copy link
Copy Markdown
Collaborator

@Loirooriol Loirooriol commented Mar 9, 2026

This makes Servo use the same ListStyleType as Gecko. In particular:

  • counter() and counters() will no longer accept a none style.
  • list-style-type will now accept a string.
  • Both list-style-type and counters will now accept arbitrary keywords. However, Servo's flavor of Stylo will still reject @counter-style rules. So non-predefined keywords will just default to decimal.
  • Both list-style-type and counters will now accept symbols().

This makes Servo use the same as Gecko. In particular:
- `counter()` and `counters()` will no longer accept a `none` style.
- `list-style-type` will now accept a string.
- Both `list-style-type` and counters will now accept arbitrary keywords.
  However, Servo's flavor of Stylo will still reject `@counter-style`
  rules. So non-predefined keywords will just default to `decimal`.

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
@Loirooriol Loirooriol changed the title Unify ListStyleType with among Gecko and Servo Unify ListStyleType among Gecko and Servo Mar 9, 2026
@Loirooriol Loirooriol marked this pull request as ready for review March 9, 2026 19:41
@Loirooriol Loirooriol requested a review from mrobinson March 9, 2026 19:41
Copy link
Copy Markdown
Member

@mrobinson mrobinson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent.

@Loirooriol Loirooriol added this pull request to the merge queue Mar 11, 2026
Merged via the queue into servo:main with commit 2a6d7c0 Mar 11, 2026
5 checks passed
@Loirooriol Loirooriol deleted the list-style-type branch March 11, 2026 13:08
github-merge-queue Bot pushed a commit to servo/servo that referenced this pull request Mar 11, 2026
Bumps Stylo to servo/stylo#329, and modifies the
code accordingly:
- Implements basic `counter()` and `counters()`, instead of treating
them as empty string.
- For `list-style-type`, uses normal space instead of non-breaking space
in the suffix, since `::marker` has `white-space: pre` anyways.
`counter()` and `counters()` don't get a suffix.
- Changes `disclosure-closed` to use ▸ (U+25B8 Black Right-Pointing
Small Triangle) instead of ‣ (U+2023 Triangular Bullet).
- Implements `list-style-type: <string>`.
- Implements basic `<counter-style-name> | <symbols()>` for both
counters and `list-style-type`.

However, since `@counter-style` and `counter-*` properties are still
unsupported, non-predefined keywords just default to decimal, and
counters are assumed to have a value of 0.

The UA stylesheet is tweaked to avoid a problem when `list-style-type`
is set to a string with multiple lines.

Testing: 63 tests improve, 17 tests worsen (they were falsely passing
beforehand)
- #43117
-
`tests/wpt/tests/css/css-lists/content-property/marker-text-matches-circle.html`
-
`tests/wpt/tests/css/css-lists/content-property/marker-text-matches-disc.html`
-
`tests/wpt/tests/css/css-lists/content-property/marker-text-matches-square.html`
- #43118
  - `tests/wpt/tests/css/css-lists/nested-marker-dynamic.html`
  - `tests/wpt/tests/css/css-lists/nested-marker.html`
- #43036
-
`tests/wpt/tests/css/css-lists/list-style-type-decimal-line-height.html`
  - `tests/wpt/tests/css/css-pseudo/marker-content-002.html`
  - `tests/wpt/tests/css/css-pseudo/marker-content-003.html`
  - `tests/wpt/tests/css/css-pseudo/marker-content-003b.html`
  - `tests/wpt/tests/css/css-pseudo/marker-content-004.html`
  - `tests/wpt/tests/css/css-pseudo/marker-content-005.html`
  - `tests/wpt/tests/css/css-pseudo/marker-content-015.html`
  - `tests/wpt/tests/css/css-pseudo/marker-content-016.html`
  - `tests/wpt/tests/css/css-pseudo/marker-content-018.html`
- #30365
-
`tests/wpt/tests/css/css-pseudo/marker-font-variant-numeric-default.html`
  - `tests/wpt/tests/css/css-pseudo/marker-line-height.html`
- #43119
  - `tests/wpt/tests/css/css-pseudo/marker-tab-size.html`

Fixes: #43037

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
lando-worker Bot pushed a commit to mozilla-firefox/firefox that referenced this pull request Apr 3, 2026
github-actions Bot pushed a commit to longvatrong111/stylo that referenced this pull request Apr 4, 2026
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