digitoimistodude / air-light

💨 WordPress starter theme - designed to be minimal, ultra-lightweight (< 20 kB) and easy for all kinds of WordPress projects. 7+years/1000+hours of development and still updating daily! We prefer the original WordPress way of doing things so no strange templating languages or frameworks here.
https://airwptheme.com
MIT License
929 stars 139 forks source link

Removed rem size hack, closes #192 #196

Closed raikasdev closed 1 month ago

raikasdev commented 10 months ago

Removing the rem size hack as described in #192 and replacing it with a SASS function (from the article mentioned in the issue ).

The sizes might be wonky! The change from 1rem = 10px to rem function was made with VSCode replace using Regex, so errors are possible. No problems with building or stylelint, though.

Note: CSS variables must use the compile time syntax #{rem(16px)} for it to work. Using it straight in statements or in SCSS variables is fine.

Closes #192

height[bot] commented 10 months ago

Link Height tasks by mentioning a task ID in the pull request title or commit messages, or description and comments with the keyword link (e.g. "Link T-123").

💡Tip: You can also use "Close T-X" to automatically close a task when the pull request is merged.

ronilaukkarinen commented 7 months ago

Hmm, I'm really not a fan of using a function or mixin for sizes that are everywhere... Rather than this could we just change the math here and let stylelint-rem-over-px to take care of the conversion? We could change the math and then, change/remove the root size for body and then just go through every font size and re-save the files?

raikasdev commented 1 month ago

Yep, something like that would need to be done. This PR can't be used in it's current stage, as a rem() has been introduced to CSS. I'm closing this PR as this would need to be reworked completely.