sveltejs/svelte-preprocess

CompileError [ParseError]: :global() must contain a selector

Open

#613 ouverte le 11 sept. 2023

Voir sur GitHub
 (2 commentaires) (1 réaction) (0 assignés)TypeScript (150 forks)auto 404
bughelp wanted

Métriques du dépôt

Stars
 (1 798 stars)
Métriques de merge PR
 (Métriques PR en attente)

Description

Describe the bug I'm using stylus as the css preprocessor. This syntax is no longer working and throwing an error instead. It looks like the processed code does not add the necessary brackets for keyword :global.

:global
    div
        display block
    p
         display inline-block

Logs

    '5: \n' +
    '6: <style lang="stylus">:global div,\n' +
    '                        ^\n' +

To Reproduce Try the above code

Expected behavior No error occurs.

Stack trace goes here...

Information about your project:

  • Your browser and the version: No need

  • Your operating system: Debian bookworm

  • svelte-preprocess version 5.0.4

  • Rollup

Additional context It used to work.

Guide contributeur