#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

#1573 in Web programming

Download history 240/week @ 2024-09-25 102/week @ 2024-10-02 503/week @ 2024-10-09 560/week @ 2024-10-16 425/week @ 2024-10-23 940/week @ 2024-10-30 1000/week @ 2024-11-06 696/week @ 2024-11-13 727/week @ 2024-11-20 669/week @ 2024-11-27 889/week @ 2024-12-04 884/week @ 2024-12-11 788/week @ 2024-12-18 794/week @ 2024-12-25 375/week @ 2025-01-01 580/week @ 2025-01-08

2,698 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