a CSS selector compiler & engine
BSD-2-CLAUSE License
context
, which means that no parent elements of the context will be matched. (Eg. a b c
with context b
will never give any results.)relativeSelector
option is set to false
, selectors won't be absolutized and selectors can test for parent elements outside of the context
.:is(...)
or :not(...)
. (#758) 77945c4domhandler
's node types have changed. Some of these changes were inherited by css-select
#754css-select
is now a dual CJS and ESM package #756
:host-context
#755
pseudos
option #757
filters
, pseudos
and aliases
is now deprecated.Published by fb55 over 2 years ago
.class
and #id
selectors are case-insensitive.prevElementSibling
adapter method by @fb55 in 78776e8*|div
, [foo|bar]
already caused errors before this release. We now parse them properly and throw errors with better descriptions.Full Changelog: https://github.com/fb55/css-select/compare/v4.2.1...v4.3.0
appendNextSiblings
(#656) 726f51bPublished by fb55 almost 3 years ago
:where
pseudo class as alias for :is
by @jannispl in https://github.com/fb55/css-select/pull/582
Full Changelog: https://github.com/fb55/css-select/compare/v4.1.3...v4.2.0
Fixes:
compile
's return value type was updated to Node
, instead of an Element
(more types can now be passed). 1419455Dependencies:
css-what
from 5.0.0 to 5.0.1, fixing potentially expensive regex (#451) e3f4cf1@types/boolbase
636c238context
types e15cc53context
types not being updated everywhere d2b0409Added support for additional parameter types:
New features:
[email protected]
s
flag in attribute selectors.Fixes:
!=
ignoring elements without attribute (#402) 4484259Other:
strict
option 9329fb8
prepareContext
function f997165cacheResults
option 6db3de6default
property. If you used the exported function before, you will have to update your code.adapter.equals
across the codebase
options
object, not the adapter anymore. To update your code, extract the adapter from the options object, eg. pseudos.custom = (elem, adapter) => {}
is now pseudos.custom = (elem, {adapter}) => {}
.:any-link
:has
(fixes #111)