Skip to content

[transformer-directives] @apply do not recognize multiple values in less in Astro #4908

Closed as not planned

Description

@OverflowCat

UnoCSS version

66.5.0

Describe the bug

Multiple @apply values not recognized after updating less from 4.3.0 to latest in Astro.

Don't know if this is a regression of LESS, anyway.



Reproduction

https://stackblitz.com/edit/github-wqltvbbu?file=src%2Fpages%2Findex.astro

System Info

No response

Validations

Activity

  1. AlexRen94 commented on Dec 22, 2025

    @AlexRen94

    I met same problem as you. Google AI give me a solution as follows:
    `// unocss.config.ts
    import { defineConfig } from 'unocss';
    import transformerDirectives from '@unocss/transformer-directives';

    export default defineConfig({
    // ... other configs
    transformers: [
    transformerDirectives({
    enforce: 'pre' // Ensures UnoCSS processes @apply before other preprocessors
    })
    ]
    });`
    It solves my issue. You may have a try and see if it works for you.

    Image
  2. OverflowCat commented on Dec 25, 2025

    @OverflowCat
    ContributorAuthor

    Looks like it is caused by LESS adding an extra comma:

  3. OverflowCat commented on Dec 25, 2025

    @OverflowCat
    ContributorAuthor

    Related to less/less.js#4354.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions