#css-parser #module #metadata #error #syntax-error #lexing #returning

css-module-lexer

Lexes CSS modules returning their dependencies metadata

15 releases

0.0.15 Nov 11, 2024
0.0.14 Jun 17, 2024
0.0.10 May 24, 2024
0.0.1 Apr 15, 2024

#1569 in Web programming

Download history 360/week @ 2024-09-20 135/week @ 2024-09-27 151/week @ 2024-10-04 644/week @ 2024-10-11 452/week @ 2024-10-18 526/week @ 2024-10-25 988/week @ 2024-11-01 938/week @ 2024-11-08 733/week @ 2024-11-15 844/week @ 2024-11-22 565/week @ 2024-11-29 1027/week @ 2024-12-06 775/week @ 2024-12-13 699/week @ 2024-12-20 664/week @ 2024-12-27 386/week @ 2025-01-03

2,704 downloads per month
Used in 4 crates (via rspack_plugin_css)

MIT license

115KB
3K SLoC

css-module-lexer

Lexes CSS modules returning their dependencies metadata.

  • Blazing fast: no parsing, no AST creation, only lexing, minimal heap allocation.
  • Error tolerant: uninterrupted by bad syntax, no errors, only warnings.
  • Syntax rich: supports CSS, iCSS, and CSS Modules.

Dependencies

  • CSS:
    • @import
    • url(), image-set()
  • iCSS
    • :import
    • :export
  • CSS Modules
    • :local, :local(), :global, :global()
    • local .class, local #id
    • local scope by default
    • composes
    • nesting
    • local @keyframe
    • local var()
    • local @property
    • local @counter-style
    • local @font-palette-values
    • local grid
    • @values

Dependencies