-
Notifications
You must be signed in to change notification settings - Fork 41
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
Make it possible to change font size on text labels #50
base: master
Are you sure you want to change the base?
Conversation
Any chance to get this merged? |
--outer-font-size: var(--outer-font-size); | ||
--inner-font-size: var(--inner-font-size); |
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.
This sets those variables to themselves, which doesn't do much.
Instead the default value should be set here and should be relative to --gauge-card-width
, like the other font sizes.
--outer-font-size: var(--outer-font-size); | |
--inner-font-size: var(--inner-font-size); | |
--outer-font-size: calc(var(--gauge-card-width) / 15); | |
--inner-font-size: calc(var(--gauge-card-width) / 15); |
|
||
if (!this.config.fontsize) { | ||
this.config.fontsize = 20; | ||
} | ||
if (!this.config.outer.fontsize) { | ||
this.config.outer.fontsize = this.config.fontsize; | ||
} | ||
if (!this.config.inner.fontsize) { | ||
this.config.inner.fontsize = this.config.fontsize; | ||
} |
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.
The default values for css-variables should be set via css. See my other suggestion.
What should happen here is to use the global value for the inner and/or outer gauge, if available and no individual values are set.
if (!this.config.fontsize) { | |
this.config.fontsize = 20; | |
} | |
if (!this.config.outer.fontsize) { | |
this.config.outer.fontsize = this.config.fontsize; | |
} | |
if (!this.config.inner.fontsize) { | |
this.config.inner.fontsize = this.config.fontsize; | |
} | |
if (this.config.fontsize && !this.config.outer.fontsize) { | |
this.config.outer.fontsize = this.config.fontsize; | |
} | |
if (this.config.fontsize && !this.config.inner.fontsize) { | |
this.config.inner.fontsize = this.config.fontsize; | |
} |
can this be merged? |
Pull request for: #45 (Thanks @M4v3r1cK87 for this code!)
It would be really nice to have!