gecko-dev/servo/components/selectors
Emilio Cobos Álvarez fb715e3c6d servo: Merge #20243 - style: add infrastructure to match the :host selector (from emilio:host-selector-on-the-way); r=SimonSapin
Source-Repo: https://github.com/servo/servo
Source-Revision: 148beb4ea5f8f1680e694ac48045a632da58269c

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : e9d1c9e4dd54d3c9d5bd1f0a2805858456981598
2018-03-14 10:38:45 -04:00
..
Cargo.toml servo: Merge #19751 - Clean up the selectors crate for a new crates.io release (from servo:selectors); r=bholley 2018-01-12 16:55:12 -06:00
README.md
attr.rs servo: Merge #19162 - Allow unused imports for AsciiExt in style code (from emilio:ascii-ext); r=emilio 2017-11-09 06:49:29 -06:00
bloom.rs servo: Merge #18854 - Make optional the usage of some unstable features (from servo:servo-unstable-feature); r=nox 2017-10-13 12:26:39 -05:00
build.rs servo: Merge #18971 - Use env::var_os to read paths from the environment (from mbrubeck:var); r=emilio 2017-10-21 08:09:22 -05:00
builder.rs servo: Merge #19721 - style: Support ::slotted better (from emilio:slotted); r=heycam 2018-01-09 07:26:28 -06:00
context.rs servo: Merge #19822 - style: More tiny selector-matching cleanup (from emilio:less-match-public); r=KiChjang 2018-01-19 23:05:18 -06:00
lib.rs servo: Merge #19751 - Clean up the selectors crate for a new crates.io release (from servo:selectors); r=bholley 2018-01-12 16:55:12 -06:00
matching.rs servo: Merge #20243 - style: add infrastructure to match the :host selector (from emilio:host-selector-on-the-way); r=SimonSapin 2018-03-14 10:38:45 -04:00
nth_index_cache.rs servo: Merge #18595 - Implement an nth-index cache (from bholley:nth_index_cache); r=emilio 2017-09-21 18:10:05 -05:00
parser.rs servo: Merge #20243 - style: add infrastructure to match the :host selector (from emilio:host-selector-on-the-way); r=SimonSapin 2018-03-14 10:38:45 -04:00
sink.rs servo: Merge #17439 - Match compound selectors left-to-right (second try) (from bholley:compound_left_to_right); r=SimonSapin 2017-06-21 09:28:43 -07:00
tree.rs servo: Merge #20243 - style: add infrastructure to match the :host selector (from emilio:host-selector-on-the-way); r=SimonSapin 2018-03-14 10:38:45 -04:00
visitor.rs servo: Merge #19751 - Clean up the selectors crate for a new crates.io release (from servo:selectors); r=bholley 2018-01-12 16:55:12 -06:00

README.md

rust-selectors

CSS Selectors library for Rust. Includes parsing and serilization of selectors, as well as matching against a generic tree of elements. Pseudo-elements and most pseudo-classes are generic as well.

Warning: breaking changes are made to this library fairly frequently (13 times in 2016, for example). However you can use this crate without updating it that often, old versions stay available on crates.io and Cargo will only automatically update to versions that are numbered as compatible.

To see how to use this library with your own tree representation, see Kuchikis src/select.rs. (Note however that Kuchiki is not always up to date with the latest rust-selectors version, so that code may need to be tweaked.) If you dont already have a tree data structure, consider using Kuchiki itself.