sveltejs/svelte-preprocess

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

Open

#613 创建于 2023年9月11日

在 GitHub 查看
 (2 评论) (1 反应) (0 负责人)TypeScript (150 fork)auto 404
bughelp wanted

仓库指标

Star
 (1,798 star)
PR 合并指标
 (PR 指标待抓取)

描述

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.

贡献者指南