gecko-dev/servo/components/selectors
Emilio Cobos Álvarez 06cc98b9ff servo: Merge #20606 - style: Implement the functional :host(..) selector (from emilio:host); r=xidorn
We could invalidate in a slightly more fine-grained way, but I don't think it's
worth the churn vs. keeping the special-cases minimal.

Bug: 1452640
Reviewed-by: xidorn
MozReview-Commit-ID: 5DkQrgwg9GW
Source-Repo: https://github.com/servo/servo
Source-Revision: e11c2d97552d192b761b0684c8c6852b9dea0921

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 00941db97d18fcbea845f225d318eae4d47aab22
2018-04-10 02:16:30 -04:00
..
attr.rs servo: Merge #20454 - Update to rustc 1.25.0-nightly (bacb5c58d 2018-01-26) (from emilio:rustup); r=SimonSapin 2018-03-29 09:12:45 -04: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 #20606 - style: Implement the functional :host(..) selector (from emilio:host); r=xidorn 2018-04-10 02:16:30 -04:00
Cargo.toml servo: Merge #20465 - Bump env_logger to 0.5 and log to 0.4 in every servo crate (from Eijebong:log); r=SimonSapin 2018-03-28 15:08:52 -04:00
context.rs servo: Merge #20597 - style: Implement the non-functional :host selector (from emilio:host); r=xidorn 2018-04-09 06:41:59 -04: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 #20606 - style: Implement the functional :host(..) selector (from emilio:host); r=xidorn 2018-04-10 02:16:30 -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 #20606 - style: Implement the functional :host(..) selector (from emilio:host); r=xidorn 2018-04-10 02:16:30 -04:00
README.md
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

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.