#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

#1597 in Web programming

Download history 234/week @ 2024-08-19 228/week @ 2024-08-26 285/week @ 2024-09-02 349/week @ 2024-09-09 224/week @ 2024-09-16 340/week @ 2024-09-23 66/week @ 2024-09-30 296/week @ 2024-10-07 653/week @ 2024-10-14 459/week @ 2024-10-21 726/week @ 2024-10-28 918/week @ 2024-11-04 888/week @ 2024-11-11 673/week @ 2024-11-18 787/week @ 2024-11-25 805/week @ 2024-12-02

3,219 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