You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to suggest that TYPES.CALC should be valid for margins as well. I used patch-package to use it in my project and it does not seem to make any problems.
Today I used patch-package to patch cssstyle@2.3.0 for the project I'm working on.
Here is the diff that solved my problem:
diff --git a/node_modules/cssstyle/lib/properties.js b/node_modules/cssstyle/lib/properties.js
index 7f462f3..2af2e4e 100644
--- a/node_modules/cssstyle/lib/properties.js+++ b/node_modules/cssstyle/lib/properties.js@@ -1225,7 +1225,7 @@ var margin_local_var_isValid = function (v) {
}
var type = external_dependency_parsers_0.valueType(v);
- return type === margin_local_var_TYPES.LENGTH || type === margin_local_var_TYPES.PERCENT || type === margin_local_var_TYPES.INTEGER && (v === '0' || v === 0);+ return type === margin_local_var_TYPES.CALC || type === margin_local_var_TYPES.LENGTH || type === margin_local_var_TYPES.PERCENT || type === margin_local_var_TYPES.INTEGER && (v === '0' || v === 0);
};
var margin_local_var_parser = function (v) {
Hi! 馃憢
Firstly, thanks for your work on this project! 馃檪
I'd like to suggest that
TYPES.CALC
should be valid for margins as well. I usedpatch-package
to use it in my project and it does not seem to make any problems.The real change probably has to be done here:
cssstyle/lib/properties/margin.js
Line 12 in b527ed7
Today I used patch-package to patch
cssstyle@2.3.0
for the project I'm working on.Here is the diff that solved my problem:
This issue body was partially generated by patch-package.
The text was updated successfully, but these errors were encountered: