Skip to content

[css-fonts-4] Inconsistent order of override-colors precedence #7026

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

Closed
drott opened this issue Feb 9, 2022 · 2 comments · Fixed by #7038
Closed

[css-fonts-4] Inconsistent order of override-colors precedence #7026

drott opened this issue Feb 9, 2022 · 2 comments · Fixed by #7038

Comments

@drott
Copy link
Collaborator

drott commented Feb 9, 2022

https://drafts.csswg.org/css-fonts-4/#override-color

If the keys of multiple distinct key/value pairs identify the same color index (either by name or by integer), the first key is used for the purposes of rendering. However, for serialization purposes, both key/value pairs are present.

IMO this seems inconsistent with the usual ways of CSS in which later declarations override earlier ones. For the sake of consistency I suggest to change that to the last indexed override's value prevailing.

Was there some context that I missed for why it was defined this way around?

@drott drott added the css-fonts-4 Current Work label Feb 9, 2022
@svgeesus
Copy link
Contributor

@litherum it looks like you added that part ?

@litherum
Copy link
Contributor

Oh, I don't have any opinion about which one should win. I just needed to make a rule, so I made one. Feel free to make a PR to switch the rule around.

drott added a commit to drott/csswg-drafts that referenced this issue Feb 11, 2022
Improve consistency with other parts of CSS where later declarations
override earlier ones, fixes w3c#7026.
svgeesus pushed a commit that referenced this issue Feb 13, 2022
Improve consistency with other parts of CSS where later declarations
override earlier ones, fixes #7026.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants