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

css-module-lexer

Lexes CSS modules returning their dependencies metadata

15 releases

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

#1572 in Web programming

Download history 240/week @ 2024-07-24 295/week @ 2024-07-31 197/week @ 2024-08-07 222/week @ 2024-08-14 247/week @ 2024-08-21 305/week @ 2024-08-28 284/week @ 2024-09-04 244/week @ 2024-09-11 298/week @ 2024-09-18 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 955/week @ 2024-10-30 811/week @ 2024-11-06

2,868 downloads per month
Used in 3 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