Re: [community-group] [RFC] Format specification (#1)

I understand and agree with the appeal of using the CSS syntax, and I would be happy to help guide such an implementation, if that would actually help.

As @mirisuzanne as [expertly pointed out](https://github.com/design-tokens/community-group/issues/1#issuecomment-659542449), building upon CSS naively is likely to cause conflicts down the road. I would describe that likelihood as “_nearly certain_” or “_inevitable_”; therefore, I strongly second their advice.

Implementation wise; there are at least 2 directions that this could take which would use CSS _safely_ (_tho, I could be so, so, so very wrong_).

1. We build upon the [CSS Syntax](https://www.w3.org/TR/css-syntax-3/) as a core foundation. With this option, our format has the freedom to copy any of the existing rules, properties, and keywords that we like from CSS while creating or redefining ones where we see fit. If done with great care and great documentation, this could produce a very elegant and readable format. By leveraging the syntax, this would not be too difficult to build additional tooling around. However, this format would represent a whole new superset of CSS, incompatible with the full suite of CSS features in browsers. It would probably require a new file type and file extension as well (e.g. `FILE.dcss` or `FILE.design.css`).

2. We build upon the whole suite of CSS specifications. With this option, our format is already parsable by most tools and browsers, even if our rules and declarations don’t necessarily apply to anything on the page. We still have the freedom to imagine new concepts in CSS, but those concepts would need leverage namespaces, and or vendor prefixes, and or custom prefixes to protect themselves from ever conflicting with _true_ CSS. The format might not be nearly as elegant or readable, but it would be the most compatible.

-- 
GitHub Notification of comment by jonathantneal
Please view or discuss this issue at https://github.com/design-tokens/community-group/issues/1#issuecomment-660173548 using your GitHub account

Received on Friday, 17 July 2020 15:33:59 UTC