The Wayback Machine - https://web.archive.org/web/20211008215846/https://github.com/amzn/style-dictionary/issues/663
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

basePxFontSize is not documented #663

Open
equinusocio opened this issue Jul 1, 2021 · 4 comments
Open

basePxFontSize is not documented #663

equinusocio opened this issue Jul 1, 2021 · 4 comments

Comments

@equinusocio
Copy link

@equinusocio equinusocio commented Jul 1, 2021

hello, i just found a text mentioning a basePxFontSize configuration which is not documented anywhere inside the doc. This is really useful to use inside custom transforms and it should be documented.

@equinusocio equinusocio changed the title basePxFontSize is not documented basePxFontSize is not documented Jul 1, 2021
@equinusocio equinusocio changed the title basePxFontSize is not documented basePxFontSize is not documented Jul 1, 2021
@langsmith
Copy link

@langsmith langsmith commented Jul 3, 2021

Yes, would be great to have documentation for this. I'm trying to understand where to set a custom basePxFontSize but can't find any docs/examples.

cc @dbanksdesign

@equinusocio
Copy link
Author

@equinusocio equinusocio commented Jul 5, 2021

@langsmith I found how to use it by checking the lib source code. You have to define it inside the platform object:

  "platforms": {
    "web": {
      "basePxFontSize": 18,
@langsmith
Copy link

@langsmith langsmith commented Jul 6, 2021

Excellent, @equinusocio ! Thanks

@dbanksdesign
Copy link
Member

@dbanksdesign dbanksdesign commented Jul 7, 2021

Thank you for bringing this up! We definitely need to fix the documentation about this as it is sparse and inconsistent. Some transform descriptions like https://amzn.github.io/style-dictionary/#/transforms?id=sizeremtodp mention basePxFontSize and others don't. I'm thinking we should add a section on the transforms page about platform configurations that affect transforms like basePxFontSize. Another one is prefix which affects name transforms. Then also updating the descriptions in the JSDoc comments for the size transforms that use basePxFontSize to be consistent.

What are your thoughts? If anyone would like to submit a PR for this that would be great or we can try to do hopefully sometime soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment