Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use hyphen minus (U+002D) instead of math minus (U+2212) in ranges? #2308

Closed
tidoust opened this issue Jun 30, 2022 · 1 comment
Closed

Use hyphen minus (U+002D) instead of math minus (U+2212) in ranges? #2308

tidoust opened this issue Jun 30, 2022 · 1 comment

Comments

@tidoust
Copy link
Contributor

tidoust commented Jun 30, 2022

Bikeshed automatically converts minus signs made with hyphens (U+002D) that appear in ranges to mathematical minus sign (U+2212) characters and I'm wondering whether that's really intended.

That is typically what happens with the value of font-style in CSS Fonts, the hyphen in the "angle" range becomes a mathematical minus sign in the generated spec. Before/After comparison:

<angle [-90deg,90deg]>
<angle [−90deg,90deg]>

One other similar occurrence for the definition of <grid-line> in CSS Grid. Both occurrences seem to have been created by recent changes, I'm not aware of other places in CSS specs that have ranges with negative numbers.

Using that minus sign character is not incorrect per se, it's just that CSS Values talks about the hyphen minus when it says "The first digit of an integer may be immediately preceded by - or + to indicate the integer’s sign" and CSS parsers that can also parse the value definition syntax typically fail to parse the U+2212 minus.

@tabatkins
Copy link
Collaborator

I went ahead and did this for simplicity, since I happened to write code that serialized numbers with a hyphen-minus and didn't want to go out of my way to fix it back.

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

No branches or pull requests

2 participants