Comments (2)
Thank you for your suggestion. I think it definitely makes sense to reuse existing standards and conventions where possible and not reinvent the wheel. We do already draw some inspiration from CSS (e.g. the px
and rem
units for dimension
tokens).
However, we also need to be mindful that:
- Design tokens are intended to be platform-agnostic. They may be translated into various programming lanugages (e.g. CSS, Android resource XML files, iOS Swift code, etc.) and also used in UI design tools (e.g. Figma, Sketch, etc.) and, potentially may be used in other contexts too (e.g. rendered as visual previous in a style guide). That doesn't mean we can't mimic CSS's syntax where is makes sense, but it might mean we restrict ourselves to a sub-set of what CSS can do because other tools/platforms lack equivalent features. Or, we at least need to specify what fallback behaviour should be in tools/platforms that don't support certain kinds of values.
- Unlike CSS, our format is JSON-based. Sometimes it therefore makes sense to use more JSON-like values than CSS ones. For example the cubic bézier example you cited. Fundamentally, it's a tuple with 4 numbers. In CSS that's expressed as a function
cubic-bezier(...)
. If we were to use that directly in our spec, it would need to be something like a string value like this:"value": "cubic-bezier(...)"
. However, we've chosen to use a plain JSON array containing number values. That saves tools needing to parse the string to get those 4 numbers. - We're currently aiming at a v1 spec, so we want to focus on the most commonly used things. Adding too much complexity now would delay completing that v1 and also risks adding things that hardly anyone uses. Our preference is to start small and then iterate in future spec versions based on how people end up using the spec. It's easy to add more ways of expressing values in future versions, but we can't change or remove existing ones without it being a breaking change.
Does that make sense?
from community-group.
The spec editors have reviewed this issue and, given that there's been no further comments, have decided to close this. We thank you for your suggestion, but will continue using our own value formats for the reasons I explained in the previous comment.
from community-group.
Related Issues (20)
- Share your tools that support the DTCG format HOT 5
- Do we have a discussion channel to speed up feedback? HOT 6
- Provide "outline" token category HOT 4
- Consider using type: "$alias" for explicity
- Define how far design tokens are expected to be interoperable. HOT 1
- Remove REM/EM from specification? HOT 25
- Error in Font Weight example in spec?
- Standardizing the Handoff - Conceptual HOT 10
- Extensible Types HOT 2
- grid type HOT 6
- Specification / recommendation for custom types HOT 4
- Token Operations
- The $ property name prefix should be unnecessary with a well-structured schema HOT 10
- [Discussion]: How to transform composite tokens HOT 5
- Transition token documentation issue HOT 1
- Suggestion: colorList type for DataViz HOT 6
- Most recent edition (07/2023) missing from main page on w3c community group HOT 1
- A comment about history of design tokens HOT 2
- Type: Text alignment HOT 8
- Custom Types / Interpritations
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from community-group.