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

Replace non-ASCII punctuation (broke syntax before) #51

Merged
merged 3 commits into from
Oct 14, 2022
Merged

Replace non-ASCII punctuation (broke syntax before) #51

merged 3 commits into from
Oct 14, 2022

Conversation

addiment
Copy link
Contributor

@addiment addiment commented Oct 3, 2022

Certain CSS snippets were broken due to using unicode special characters, specifically the unicode-range property of the @font-face at-rule. The schema had some inconsistencies in using special characters and regular ASCII, so I replaced those instances with their respective ASCII counterparts.

  • Replaced U+201C/201D (left/right double quotation marks ) with U+0022 (quotation mark ")
  • Replaced U+2018/2019 (left/right single quotation marks ) with U+0027 (apostrophe ')
  • Replaced U+2013 (en dash ) with U+002D (hyphen-minus -)

While the ASCII swap on quotation marks and parenthesis is mostly preference, the unicode hyphens don't work when used in the browser, which I believe warrants the change. From the W3C CSS fonts specification:

If the next code point in text is U+002D HYPHEN-MINUS (-), consume it. Otherwise, this is an invalid <urange>, and this algorithm must exit.

4.5. Character range: the 'unicode-range' descriptor
7.1. The <urange> type

Certain CSS snippets were broken due to using unicode special characters, specifically the `unicode-range` property of the `@font-face` at-rule. The schema had some inconsistencies in using special characters and regular ASCII, so I replaced those instances with their respective ASCII counterparts.

- Replace U+201C/201D (“ and ”) with U+0022 (quotation mark ")
- Replace U+2018/2019 (left/right single quotation marks ‘ ’) with U+0027 (apostrophe ')
- Replace U+2013 (en dash –) with U+002D (hyphen-minus -)
@addiment
Copy link
Contributor Author

addiment commented Oct 3, 2022

@microsoft-github-policy-service agree

@addiment
Copy link
Contributor Author

any maintainers want to check this? @aeschli

@aeschli aeschli self-assigned this Oct 13, 2022
@aeschli aeschli added this to the October 2022 milestone Oct 13, 2022
sandy081
sandy081 previously approved these changes Oct 13, 2022
@addiment
Copy link
Contributor Author

Resolved the merge conflict (wasn't much to do), can I get another review?

@addiment
Copy link
Contributor Author

Gonna mention since this might get lost in notification hell otherwise @sandy081

@aeschli aeschli merged commit 89327fb into microsoft:main Oct 14, 2022
@aeschli
Copy link
Contributor

aeschli commented Oct 14, 2022

Thanks @addiment!

@addiment addiment deleted the patch-1 branch October 14, 2022 11:37
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.

3 participants