Skip to content

Fix @font-face font-weight range values being lost during parse#196

Merged
FlorianRappl merged 1 commit intoAngleSharp:develfrom
jafin:fix/font-face-weight-range
Mar 27, 2026
Merged

Fix @font-face font-weight range values being lost during parse#196
FlorianRappl merged 1 commit intoAngleSharp:develfrom
jafin:fix/font-face-weight-range

Conversation

@jafin
Copy link
Copy Markdown
Contributor

@jafin jafin commented Mar 27, 2026

Types of Changes

Prerequisites

Please make sure you can check the following two boxes:

  • I have read the CONTRIBUTING document
  • My code follows the code style of this project

Contribution Type

What types of changes does your code introduce? Put an x in all the boxes that apply:

  • Bug fix (non-breaking change which fixes an issue, please reference the issue id)
  • New feature (non-breaking change which adds functionality, make sure to open an associated issue first)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • My change requires a change to the documentation
  • I have updated the documentation accordingly
  • I have added tests to cover my changes
  • All new and existing tests passed

Description

The font-weight converter only accepted a single keyword or integer, so range values like "100 700" (valid CSS Fonts Level 4) were silently dropped. Use WeightIntegerConverter.Many(1, 2) to accept 1-2 space- separated weight integers.

Resolves #187

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Mar 27, 2026

CLA assistant check
All committers have signed the CLA.

The font-weight converter only accepted a single keyword or integer,
so range values like "100 700" (valid CSS Fonts Level 4) were silently
dropped. Use WeightIntegerConverter.Many(1, 2) to accept 1-2 space-
separated weight integers.
@jafin jafin force-pushed the fix/font-face-weight-range branch from 1e529a6 to a03fc2b Compare March 27, 2026 02:48
@FlorianRappl FlorianRappl added this to the v1.0 milestone Mar 27, 2026
@FlorianRappl FlorianRappl merged commit cbb53f9 into AngleSharp:devel Mar 27, 2026
5 checks passed
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.

@font-face font-weight set to a range becomes empty after parsing

3 participants