AnneT added a comment.
Another practical question: when does a variable become a design token? This is the process I've been following: 1. Is it a simple keyword, like `display: flex`? If so, probably don't use a token, unless it's something that gets repeated a lot like the value of `cursor: disabled` 2. Is it a simple value, like `width: 100%` or `margin: 0`? If so, probably don't use a token 3. Is there an existing token in Wikimedia UI base whose name makes semantic sense for this component-specific use? e.g. `border-color: @border-color-base`? If so, just use the Wikimedia UI base token 4. Is there an existing token in Wikimedia UI base but the name doesn't make semantic sense for this component-specific use, like `background-color: @color-primary--active` or `border-color: @wmui-color-base20`? If so, create a new component-specific token 5. If none of these things are true, create a new component-specific token There's a lot of gray area in here, though, especially step 2. I looked through some WVUI components I've built and found some examples of values for which I did not create a token: - `outline: 1px solid transparent` - `content: ' '` - `top: 50%` - `border: @border-width-base @border-style-base transparent` - `transition: background-color @transition-base, border-color @transition-base, border-width @transition-base;` Those could all be debatable. The goal would be to take the debate out of it as much as possible with clear instructions on when one should create a token. TASK DETAIL https://phabricator.wikimedia.org/T266688 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: AnneT Cc: egardner, Catrope, Tonina_Zhelyazkova_WMDE, Jakob_WMDE, Michael, AnneT, Pginer-WMF, raja_wmde, ItamarWMDE, Sarai-WMDE, Aklapper, Volker_E, Invadibot, caldera, maantietaja, Akuckartz, DannyS712, Nandana, Lahi, Gq86, GoranSMilovanovic, QZanden, LawExplorer, Iniquity, _jensen, rosalieper, JGirault, Scott_WUaS, Niedzielski, Wikidata-bugs, aude, Lydia_Pintscher, Mbch331, Jay8g
_______________________________________________ Wikidata-bugs mailing list -- [email protected] To unsubscribe send an email to [email protected]
