-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Normalize references to CSS data types in feature object #6349
Comments
I agree we could use a data guideline for this sort of thing. We'd want to settle on a key name and a description format. If we took an approach like DOM events, we could have some rules like:
For the actual type name, I think we should let the specifications take the lead: |
I have a question because I'm not a CSS expert. Does what's listed in the specs match what has to be entered in a stylesheet? It seems like that's what we would want to use. |
Sometimes that works and I support doing it where it does. We have some features like Percentages could work the same, but it's a little weird. Personally, I don't like the idea of a But things break down with something like And there are a few compound types, like |
Sounds great! Thank you both for your input |
That sounds right to me. Thank you! |
The point I was going for was that even though you put a number in front of it, you still write 'em' literally in the stylesheet. The situation I had in mind was one that would be analogous to a problem we have in JavaScript where something like |
#18198 seems potentially relevant to this; it's an example where currently multiple things are defined as |
I was going through a lot of compatibility table for CSS properties today. And I realised that there are no standard way of referencing a CSS data type from the feature object
Looking at the CSS Types page on MDN it seems that the convention is to have the name of the type between angle brackets. We lack that consistency in the compatibility data and that leads to inconsistencies
The following files both reference differently
css/properties/word-spacing
percentage is pluralisedcss/properties/font-stretch
percentage is singularcss/properties/opacity
percentage is pluralised but has a differentdescription
Normalizing this would help us having a consistent keys in the feature object, a consistent
name
,description
andmdn_url
That information usually exists within the MDN page, so why not on the compatibility table too?
It seems that the JSON schema prevents us from using angle brackets
<
and>
in the key, that could potentially be quite a big change to makeWanted to gather everyone's ideas around this matter. Keen to hear your thoughts and start drafting what the next steps would be
The text was updated successfully, but these errors were encountered: