-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor(tokens): move less variables to css props #2163
Conversation
c6acc22
to
e1a6f9d
Compare
One thing worthy of discussion is whether we want to continue with the token shorthand mixin that we were using for colors. or move away from that, e.g.
FYI the first parameter here is intended as a component-level override (e.g. if we needed a version of the component on the page that needed to differ from the colour system). I also use this on MIND and Makeup to easily apply different non-ebay colors. There are probably different (and better?) ways to achieve the same goal though. Here's example of the component-level API documented for switch: https://opensource.ebay.com/skin/#switch-variables |
769f73b
to
fbebc53
Compare
Team has discussed internally and decided to continue with the token mixin the way we are using for now. Need to have a separate discussion later on how we would like to define or expose API for component level by aligning with skin's long term vision. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Assuming we resolve the conflict in the branch and things still look good, this is approved.
5d2d346
to
72f0b41
Compare
Fixes #1992, #2138
Description
Refactored following less variables to css variables
Left the rest(@_screen-size-, @_page-grid-, @marketsans-*) as the first two are constants and we don't want to allow overrides and the later due to restriction in css vars.
Notes
font-size
, we have flexibility with defining sizes(12, 14, 16...) and variants(like small, med, large..). It makes perfect sense using it in less. Assuming components use only variants, I personally feel there is no advantage of having that flexibility in css vars because its just a 1:1 mapping in tokens file. Besides that we will be sending all these tokens (more lines of code). While review, please state your preference to leave both as is or to simplify it. If we simplify it we need to identify the right variant tokens for combobox and select which are currently using--font-size-18
Checklist