Skip to content
This repository has been archived by the owner on Jun 21, 2022. It is now read-only.

cssinfo: Back to data/master, wrap initial values in <code> #162

Merged
merged 2 commits into from
May 13, 2017

Conversation

jwhitlock
Copy link
Contributor

In properties.json, initial can have three types of values:

  1. A literal value, like 0 or 0% 0% or none, as seen on overflow.
  2. A key into the localization strings file, as seen on -moz-appearance.
  3. A list, each item which matches case 1 or 2.

Previously, case 1 (literal values) were designated with a <code> wrapper, and this was used in the MDN output. In mdn/data#52, the wrapper was removed, so there is no longer a distinction between case 1 or 2.

This PR uses the presence of the string in the localization strings as a way to distinguish between cases 1 and 2. If the string is not a localization key, a <code> wrapper is added for display. The PR also normalizes tabs to spaces.

Alternatively, a stronger method could be used in properties.json to distinguish between case 1 and 2.

Related to PR #132.

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.

This works for me, and I'm happy that this brings us back to data/master.

We might change the implementation again, when there is a design decision in mdn/data#61 but I think we could go with this for now.

@jwhitlock
Copy link
Contributor Author

I think mdn/data#61 is going to take a while to resolve. I also suspect that we'll need to release a versioned NPM package sooner rather than later, since the mdn/data schema and data model continues to evolve, and KS doesn't currently have a clean way to upgrade data usage w/o breakage. Merging.

@jwhitlock jwhitlock merged commit f288e3b into mdn:master May 13, 2017
@jwhitlock jwhitlock deleted the cssinfo_initial branch May 13, 2017 19:01
jwhitlock added a commit to mdn/kuma that referenced this pull request May 15, 2017
* mdn/kumascript#162 - cssinfo: mdn/data master, Add <code> wrapper
* mdn/kumascript#175 - GroupData: update Fetch API
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants