-
Notifications
You must be signed in to change notification settings - Fork 34
Nested calc with css variables #91
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
Comments
Yes I have a similar issue. body {
--header-height: 57px;
--header-bottom-padding: 8px;
--footer-height: 38px;
--footer-vertical-padding: 32px;
--body-height: calc(100vh - (var(--footer-height) + var(--footer-vertical-padding)));
--site-wrapper-min-height: calc(var(--body-height) - (var(--header-height) + var(--header-bottom-padding)));
--calendar-body-height: calc(
var(--site-wrapper-min-height) -
(var(--month-header-height) + var(--days-header-height) + var(--site-content-children-vertical-padding))
);
--month-header-height: 30px;
--days-header-height: 30px;
--site-content-children-vertical-padding: 10px;
width: 100%;
height: var(--body-height);
z-index: 10;
} After pack: body {
--header-height: 57px;
--header-bottom-padding: 8px;
--footer-height: 38px;
--footer-vertical-padding: 32px;
--body-height: calc(100vh - var(--footer-height) - var(--footer-vertical-padding));
--site-wrapper-min-height: calc(var(--body-height) - (var(--header-height) + var(--header-bottom-padding)));
--calendar-body-height: calc(
var(--site-wrapper-min-height) -
var(--month-header-height) + var(--days-header-height) + var(--site-content-children-vertical-padding));
--month-header-height: 30px;
--days-header-height: 30px;
--site-content-children-vertical-padding: 10px;
width: 100%;
height: var(--body-height);
z-index: 10;
} If you notice that It looks like Cssnano is using this and referencing the latest version. |
I believe this to be the issue postcss/postcss-calc#91 I'm hard locking us to the previous version until this matter is resolved
* These imports should be on the same line * Fix Radio CSS I believe this to be the issue postcss/postcss-calc#91 I'm hard locking us to the previous version until this matter is resolved
I raised an issue on cssnano (cssnano/cssnano#628) but believe the issue lies upstream from there in this repo. I am able to reproduce the same behavior, that the following two CSS styles produce different outputs (confirmed in Chrome 80 and Firefox 74 on Mac OS 10.15.3): padding-bottom: calc(100% / (var(--aspect-ratio))); Computed: padding-bottom: calc(100% / var(--aspect-ratio)); Computed: I'm not sure why the parentheses matter in this situation, but the empirical evidence suggests they do. I suggest therefore the parentheses should not be removed. |
* These imports should be on the same line * Fix Radio CSS I believe this to be the issue postcss/postcss-calc#91 I'm hard locking us to the previous version until this matter is resolved
Confirm the bug. Is there any way to solve? |
I solved removing postcss-calc and using this: |
So the first issue is already fixed in 8.2, while the issue in #91 (comment) is a duplicate of #113 |
thanks @evilebottnawi for redirection. #816
I'm encountering an issues while using calc() with CSS Custom variables where presets automatically remove my nested calc while custom variables is unable to resolve in build time.
Given that:
when it comes to a css variables
which is incorrect in mathematical stand points. To solve this problem, I end up by setting calc preset to false in plugin options.
Is there any possible to omit any clearing unintended nested calc while encountering css variable or if there is any better solution while dealing with variables value?
The text was updated successfully, but these errors were encountered: