Open GrandSchtroumpf opened 1 year ago
@devongovett Meet simliar issue, use it with MiniCssExtractPlugin
with input:
.header {
height: 60px;
height: var(--header-height); // 68px;
}
with output
.header {
height: var(--header-height); // 68px;
height: 60px;
}
@devongovett Meet simliar issue, use it with MiniCssExtractPlugin
with input:
.header { height: 60px; height: var(--header-height); // 68px; }
with output
.header { height: var(--header-height); // 68px; height: 60px; }
downgrade to 1.19.0
works fine
I ran into the same problem, documented here: https://github.com/parcel-bundler/lightningcss/issues/547
This just bit me.
@media (prefers-reduced-motion: no-preference) {
.site-footer {
animation: spin linear both;
animation-timeline: scroll();
}
}
turns to
@media (prefers-reduced-motion: no-preference) {
.site-footer {
animation-timeline: scroll();
animation: spin linear both;
}
}
And thus the animation-timeline
is overwritten and breaks.
This is indeed problematic, I spent a few hours figuring out why my scroll-timeline experiments did not work. The animation-timeline order needs to be preserved :).
That's because animation-timeline
was added to the animation
shorthand which we didn't support parsing yet. The above commit should handle that.
Hi @devongovett . I have face a similar issue related to animation-range. In Chrome at least, Lightning CSS will ignore this:
.foo {
animation: linear foo;
animation-timeline: view();
animation-range: entry-crossing 0% exit-crossing 100%;
}
Into this:
.foo {
animation-range: entry-crossing 0% exit-crossing 100%;
animation: linear foo;
animation-timeline: view();
}
The issue is that re-ordered this way Chrome will ignore the animation-range. It has to be after the animation-timeline.
Still use 1.19.0 version, pending upgrade to latest version due to this issue...
@devongovett Meet simliar issue, use it with MiniCssExtractPlugin
with input:
.header { height: 60px; height: var(--header-height); // 68px; }
with output
.header { height: var(--header-height); // 68px; height: 60px; }
maybe we can minify into this way:
.header {
height: var(--header-height, 60px);
}
Additional example: I ran into this issue progressively enhancing some details elements:
details {
&::details-content {
display: block;
block-size: 0;
overflow: hidden;
transition-behavior: allow-discrete;
transition-duration: 0.25s;
transition-property: block-size, content-visibility;
transition-timing-function: ease-in-out;
}
&[open]::details-content {
block-size: auto;
/* This property gets put before the line above for some reason */
block-size: calc-size(auto);
}
}
Splitting the above into two blocks avoided the issue:
/* Separated due to Lightning CSS bug */
&[open]::details-content {
block-size: auto;
}
&[open]::details-content {
block-size: calc-size(auto);
}
issue with width/height/sizes fixed by 22a8b6f937d391ca98adb09ae7971f34a46d2b5d
It seems that the order of properties are not maintained when bundle with lightning css.
With this input :
I've got this output :
The issue is that
animation
will overrideanimation-timeline
, so it'll not work.I'm using vite with this config :