Skip to content

Add compat data for text formatting CSS properties#725

Merged
Elchi3 merged 8 commits intomdn:masterfrom
ddbeck:css-text-formatting
Jan 5, 2018
Merged

Add compat data for text formatting CSS properties#725
Elchi3 merged 8 commits intomdn:masterfrom
ddbeck:css-text-formatting

Conversation

@ddbeck
Copy link
Contributor

@ddbeck ddbeck commented Dec 16, 2017

This PR migrates the following text formatting CSS properties:

One thing I was not completely certain about here was overflow-wrap, which also goes under the non-standard alias word-wrap. I opted to use alternative_names to structure the support for the non-standard alias, though I think there might also be a case for making a separate word-wrap.json file. If you would rather to see that happen, let me know and I'll update this PR. Thanks!

@teoli2003 teoli2003 added the data:css Compat data for CSS features. https://developer.mozilla.org/docs/Web/CSS label Dec 17, 2017
Copy link
Member

@Elchi3 Elchi3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one tiny typo.

Regarding "overflow-wrap, which also goes under the non-standard alias word-wrap": It seems like the spec also has "word-wrap" now, so it is actually part of the standard. I like the way you've handled this with alternative_name.

The MDN page will query the data you've migrated here (under css.properties.overflow-wrap"), so I think it's fine.

We can add a similar data set under "css.properties.word-wrap", it would duplicate the data, but tools which strictly go by the CSS property names (like https://github.com/eduardoboucas/compat-report) would probably work better with the data available under the second name as well and it could point to overflow-wrap as an alternative_name the other way around.

},
"svg_support": {
"__compat": {
"description": "Suppor in SVG",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo "Support"

@ddbeck
Copy link
Contributor Author

ddbeck commented Jan 5, 2018

OK, I've fixed the typo and I added a word-wrap.json file which mostly mirrors the data in overflow-wrap.

It might be nice to some day have this package to allow a sort of "see also" format (something like { "__compat": { "see": "css.properties.some_prop" } } to avoid the duplication, though hashing out what that's supposed to mean exactly might be complicated. Should I open an issue for that or is it too rare to matter?

@Elchi3
Copy link
Member

Elchi3 commented Jan 5, 2018

Great, thanks!

I think the "see also" format is interesting. For APIs, there are sometimes entire feature trees that have the same compat data and we're repeating this info leading to some giant JSON files. On the other hand, and from a data consumer point of view, I feel like I don't want to deal with yet another thing to resolve for displaying the data :-) File an issue, good to have a discussion about this on record.

Copy link
Member

@Elchi3 Elchi3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, r+

@Elchi3 Elchi3 merged commit 42b0c01 into mdn:master Jan 5, 2018
@ddbeck ddbeck deleted the css-text-formatting branch January 5, 2018 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

data:css Compat data for CSS features. https://developer.mozilla.org/docs/Web/CSS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants