Skip to content
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

Want to set default font size to use in build-in transforms. #373

Closed
funyapu opened this issue Jan 14, 2020 · 3 comments
Closed

Want to set default font size to use in build-in transforms. #373

funyapu opened this issue Jan 14, 2020 · 3 comments

Comments

@funyapu
Copy link

funyapu commented Jan 14, 2020

All of the build-in rem converting transforms uses 16 as base px.
It would be nice if user can set their default value for better flexibility.

@dbanksdesign
Copy link
Member

This is a great suggestion! Would setting an attribute on the platform object work? Like:

{
  "source": ["tokens/**/*.json"],
  "platforms": {
    "web": {
      "baseFontSize": 14,
      "transformGroup": "web",
      "files": [{ }]

@funyapu
Copy link
Author

funyapu commented Jan 15, 2020

Thanks. Seems brilliant to me.

One thing people may want in additional is having multiple base font size per screens.
Many websites and apps are having larger font size in mobile view.

@dbanksdesign
Copy link
Member

This was solved in #505 and is available in 3.0 which you can get a pre-release of with npm install style-dictionary@next

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants