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

css-module-lexer

Lexes CSS modules returning their dependencies metadata

14 releases

0.0.14 Jun 17, 2024
0.0.13 Jun 12, 2024
0.0.10 May 24, 2024
0.0.1 Apr 15, 2024

#1612 in Web programming

Download history 294/week @ 2024-06-21 271/week @ 2024-06-28 190/week @ 2024-07-05 184/week @ 2024-07-12 252/week @ 2024-07-19 387/week @ 2024-07-26 155/week @ 2024-08-02 230/week @ 2024-08-09 200/week @ 2024-08-16 230/week @ 2024-08-23 314/week @ 2024-08-30 280/week @ 2024-09-06 246/week @ 2024-09-13 360/week @ 2024-09-20 135/week @ 2024-09-27 100/week @ 2024-10-04

888 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