-
Notifications
You must be signed in to change notification settings - Fork 0
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
pxToRem-settings #157
base: master
Are you sure you want to change the base?
pxToRem-settings #157
Conversation
'!filter', | ||
'!border', | ||
'!border-width', | ||
'!border-top-width', |
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.
Please sort the list alphabetically
@@ -27,9 +27,30 @@ module.exports = () => ({ | |||
}), | |||
postcssDiscardEmpty(), | |||
pxtorem({ | |||
minPixelValue: 3, |
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'm not sure all these changes are useful..
usually we use rems scaling. See example: on 1440px design you have border with 2px width. But what you will show on retina 5120px resolution? Your 2px will look tiny. That's why everything should be converted to rems
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.
For the CSS which is really required to be in pixel, you can use the following code:
.selector {
/* stylelint-disable-next-line unit-case */
width: 2PX;
}
In that case it will not be automatically converted to rems
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 would better set fixed base font size after 1920
Upd.
After discussions and Drupal best practices: we are going to convert into rem all.
Some cases where need to be used line in 1px - it should be done by border.
====
Setted ignore list of styles, like border etc.
Proposition for minimum px to covert = starts from 3px.
It minimizes adding everywhere exclusion for the linter and for the calculation of the CSS.
Proposition to disable unit case check and linter fix.
inside file ".stylelintrc"
add "unit-case": null,
Also, to minimize linter exclusion of unit-case in the code.
I don't think that converting 1px or even 2px sometimes is a good idea, also add every time exclusion for the border: 1px;
We can disable this globally.
Where we need this in rem's - we can convert it manually.