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
{{ message }}
This repository was archived by the owner on Feb 18, 2022. It is now read-only.
When running postcss-logical on @keyframes at-rule blocks, the resulting CSS isn't valid.
For example, I have this CSS that produces a basic loading bar-like effect (a div starts at 0% fixed on the "left", grows to 100% width, then reduces back to 0% whilst fixed on the "right"). This is achieved using the left-right directional properties inset-inline-start and inset-inline-end.
Running it though postcss-logical on the default configuration produces this invalid CSS, where each timing step has been prefixed with a [dir] attribute selector:
This issue does not occur if the dir configuration option is set, as it doesn't prepend [dir] attribute selectors in that situation.
I'm not sure how the desired result can actually be achieved in an automated fashion due to the inability to nest selectors within @keyframes. It would seemingly be required to have multiple @keyframes definitions and to swap which one is used based on the directionality of the calling selector.
Regardless of how to achieve that, postcss-logical adding these selectors within a @keyframes at-rule block currently creates invalid CSS, and the tool should probably ignore any CSS properties that would create such selectors.
The text was updated successfully, but these errors were encountered:
romainmenke
added a commit
to romainmenke/postcss-logical
that referenced
this issue
Aug 19, 2021
@querkmachine This issue has been resolved in the latest release.
At the moment the plugin will leave any CSS inside @keyframes untouched.
This is preferable to generating broken CSS and leaves the author the possibility of manually writing fallbacks.
This repo has been moved to @csstools/postcss-plugins. If you have any further questions or issues we are happy to assist there!
When running postcss-logical on
@keyframes
at-rule blocks, the resulting CSS isn't valid.For example, I have this CSS that produces a basic loading bar-like effect (a div starts at 0% fixed on the "left", grows to 100% width, then reduces back to 0% whilst fixed on the "right"). This is achieved using the left-right directional properties
inset-inline-start
andinset-inline-end
.Running it though postcss-logical on the default configuration produces this invalid CSS, where each timing step has been prefixed with a
[dir]
attribute selector:This issue does not occur if the
dir
configuration option is set, as it doesn't prepend[dir]
attribute selectors in that situation.I'm not sure how the desired result can actually be achieved in an automated fashion due to the inability to nest selectors within
@keyframes
. It would seemingly be required to have multiple@keyframes
definitions and to swap which one is used based on the directionality of the calling selector.Regardless of how to achieve that, postcss-logical adding these selectors within a
@keyframes
at-rule block currently creates invalid CSS, and the tool should probably ignore any CSS properties that would create such selectors.The text was updated successfully, but these errors were encountered: