gecko-dev/servo/components/selectors
Michael Wilson 4e69e9cedb servo: Merge #19195 - style: :dir() pseudo class now represented by enum (from wilsoniya:issue-16840); r=emilio
`:dir()` pseudo class param now represented as enum variants.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #16840
- [X] There are tests for these changes

Source-Repo: https://github.com/servo/servo
Source-Revision: 006202732f0bd8d2239bdd51898380bdbe0f0f1a

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : e9778d171eef1db2ebbf52b99d3255d50b2a60ec
2017-11-21 02:56:49 -06:00
..
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 #18790 - Support :scope pseudo-class (from upsuper:scope); r=emilio 2017-10-09 23:04:15 -05:00
Cargo.toml servo: Merge #18967 - Bump bitflags to 1.0 (from Eijebong:bitflags2.0); r=mbrubeck 2017-10-30 18:25:45 -05:00
context.rs servo: Merge #18962 - Support matching for ::-moz-tree-* pseudo-elements (from upsuper:tree-pseudos); r=emilio 2017-10-20 04:18:53 -05:00
gecko_like_types.rs servo: Merge #19195 - style: :dir() pseudo class now represented by enum (from wilsoniya:issue-16840); r=emilio 2017-11-21 02:56:49 -06:00
lib.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
matching.rs servo: Merge #19226 - style: Sprinkle some inline in trivial methods (from emilio:inline-qs); r=nox 2017-11-15 09:22:14 -06: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 #19263 - selectors: Allow white space in the brackets of an attribute selector (from heycam:attr-ws); r=SimonSapin 2017-11-18 00:47:57 -06: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
size_of_tests.rs servo: Merge #17687 - Support parsing ::-moz-tree-* pseudo-elements selector (from upsuper:tree-pseudo); r=heycam 2017-07-12 03:35:37 -07:00
tree.rs servo: Merge #18934 - style: Make MatchingContext generic over SelectorImpl (from emilio:matching-context-generic); r=xidorn,heycam 2017-10-19 05:43:51 -05:00
visitor.rs servo: Merge #18232 - Remove unused SelectorIter import (from ferjm:unused.selectoriter); r=emilio 2017-08-25 11:18:12 -05: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.