-
Notifications
You must be signed in to change notification settings - Fork 5
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
(#153) Enforce using rems/ems in stylesheets #204
Conversation
d12c058
to
ea9cb3a
Compare
ea9cb3a
to
9170f89
Compare
9170f89
to
61e753f
Compare
less/accessible-text-svg.less
Outdated
@@ -10,27 +10,27 @@ body { | |||
|
|||
&__text { | |||
fill: black; | |||
stroke-width: 2px; | |||
font-size: calc(54px * var(--text-zoom-factor)); | |||
stroke-width: 0.125rem; |
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.
I was hoping we can just force font-size to be in rems. Is there a way of doing that?
less/chart.less
Outdated
border: solid 1px black; | ||
width: initial; | ||
} | ||
|
||
svg { | ||
font-size: 16px; | ||
font-size: 1rem; |
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.
I think there is a little misunderstanding. I would like font-size
to use the LESS mixin (i.e. 16/@px).
This is to be consistent with the advice we are giving on this page:
https://www.useragentman.com/enable/text-resize.php#replace-pixels-with-rems--heading
Your check can look at the resultant CSS to make sure there are no px
units in a font-size
property, if that makes it easier.
Let's talk more about this tomorrow.
61e753f
to
a54f653
Compare
Closes #153 * Added and enabled `stylelint-rem-over-px` * Fixed console errors * Removed `stylelint-rem-over-px` for `stylelint`'s `declaration-property-unit-allowed-list` rule which allows for greater flexibility * Cleaned up console errors * Separated `stylelint` into it's own task for `lint-staged` * Fxied up font-size calculations
a54f653
to
31d89e3
Compare
Closes #153
stylelint-rem-over-px