Skip to content

css-minifier: some compression rules fail when @keyframes are inside @layer #2027

Closed
@yisibl

Description

@yisibl
@layer foo {
  @keyframes     slide-left    {
    from   { width: 200px; }
    100%   { width: 500px; }
  }
}

esbuild output:

@layer foo{@keyframes slide-left {from {width: 200px;} 100% {width: 500px;}}}

Expectation

No problem when there is no @layer. https://caniuse.com/mdn-css_at-rules_layer

@layer foo{@keyframes slide-left{0%{width:200px}to{width:0}}}

Activity

evanw

evanw commented on Feb 17, 2022

@evanw
Owner

This is a new CSS rule so esbuild doesn't know about it yet. I can add basic support for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @evanw@yisibl

        Issue actions

          css-minifier: some compression rules fail when `@keyframes` are inside `@layer` · Issue #2027 · evanw/esbuild