simplecss

Crates.iosimplecss
lib.rssimplecss
version0.2.1
sourcesrc
created_at2017-01-14 18:14:03.493091
updated_at2021-07-20 16:46:17.104846
descriptionA simple CSS 2 parser and selector.
homepage
repositoryhttps://github.com/RazrFalcon/simplecss
max_upload_size
id8064
size87,663
Kaur Kuut (xStrom)

documentation

README

simplecss

Build Status Crates.io Documentation Rust 1.37+

A simple CSS 2.1 parser and selector.

This is not a browser-grade CSS parser. If you need one, use cssparser + selectors.

Since it's very simple we will start with limitations:

Limitations

  • At-rules are not supported. They will be skipped during parsing.
  • Property values are not parsed. In CSS like * { width: 5px } you will get a width property with a 5px value as a string.
  • CDO/CDC comments are not supported.
  • Parser is case sensitive. All keywords must be lowercase.
  • Unicode escape, like \26, is not supported.

Features

  • Selector matching support.
  • The rules are sorted by specificity.
  • !import parsing support.
  • Has a high-level parsers and low-level, zero-allocation tokenizers.
  • No unsafe.

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Commit count: 12

cargo fmt