Closed lumnn closed 5 years ago
Sorry for the late response, but I'm not going to merge it. Since version 1.0 of this theme, we decided to keep it just as a port of LESS theme, without any additional improvements, to simplify the maintenance process. We don't want to invest more time into this project, because we are not using it for our clients. If you are looking for a theme with better code quality take a look at Alpaca theme
lib-css
mixin in Less version is used to avoid adding properties when value (or one of them if it's a list) is false.Sass does have a built in support for removing properties if value is
null
.Usage of
lib-css
makes code much more unreadable and harder to debug with source maps.To solve this problem I did some work to remove usage of this mixin making code much more simpler.
Changes
false
or""
(empty string) tonull
null
valueslib-css
calls with justproperty: value
Difference in compiled css from master
CSS compiled from master branch, and this PR is slightly different. Here is diff result:
As you can see the only difference is that one property does have
0px
instead of0
. Which is a result of calculation instyles/vendor/magento-ui/_utilities.scss
linee 398.Other difference is that one property is not included with empty string. (I guess it's a bug on master)
Backward incompatible changes
false
values in variables will result in generating incorrect CSS. This PR removes those false values, but any custom themes that override variables may result in incorrect results.0px
in Sass will be0px
in CSS, while with usinglib-css
it was resulting in just0
. I believe this could be avoided by using additional plugin for postcss processor.