New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@adguard/extended-css

Package Overview
Dependencies
Maintainers
3
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@adguard/extended-css - npm Package Compare versions

Comparing version 2.0.52 to 2.0.55

dist/types/src/common/constants.d.ts

5

CHANGELOG.md
# ExtendedCss Changelog
## [2.0.55]
### Added
- Library version number to the exports [#2237](https://github.com/AdguardTeam/AdguardBrowserExtension/issues/2237).
## v2.0.52

@@ -5,0 +10,0 @@

2

dist/build.txt

@@ -1,1 +0,1 @@

version=2.0.52
version=2.0.55
/**
* @adguard/extended-css - v2.0.52 - Fri Apr 14 2023
* @adguard/extended-css - v2.0.55 - Mon Nov 27 2023
* https://github.com/AdguardTeam/ExtendedCss#homepage

@@ -4,0 +4,0 @@ * Copyright (c) 2023 AdGuard. Licensed GPL-3.0

{
"name": "@adguard/extended-css",
"version": "2.0.52",
"version": "2.0.55",
"description": "AdGuard's TypeScript library for non-standard element selecting and applying CSS styles with extended properties.",

@@ -53,2 +53,3 @@ "main": "dist/extended-css.umd.js",

"@rollup/plugin-commonjs": "^22.0.1",
"@rollup/plugin-json": "^6.0.1",
"@rollup/plugin-node-resolve": "^13.3.0",

@@ -55,0 +56,0 @@ "@types/html-minifier": "^4.0.2",

@@ -1,2 +0,2 @@

# <a id="homepage"></a> ExtendedCss ![npm](https://img.shields.io/npm/v/@adguard/extended-css) [![install size](https://packagephobia.com/badge?p=@adguard/extended-css)](https://packagephobia.com/result?p=@adguard/extended-css) ![GitHub](https://img.shields.io/github/license/AdGuardTeam/ExtendedCss)
# <a name="homepage"></a> ExtendedCss [![npm-badge]][npm-url] [![install-size-badge]][install-size-url] [![license-badge]][license-url]

@@ -32,2 +32,3 @@ AdGuard's TypeScript library for non-standard element selecting and applying CSS styles with extended properties.

* [validate()](#extended-css-validate)
* [EXTENDED_CSS_VERSION](#extended-css-version)
* [Debugging extended selectors](#debugging-extended-selectors)

@@ -45,3 +46,3 @@ * [Projects using ExtendedCss](#projects-using-extended-css)

### <a id="extended-css-limitations"></a> Limitations
### <a name="extended-css-limitations"></a> Limitations

@@ -54,3 +55,3 @@ 1. CSS [comments](https://developer.mozilla.org/en-US/docs/Web/CSS/Comments) and [at-rules](https://developer.mozilla.org/en-US/docs/Web/CSS/At-rule) are not supported.

### <a id="extended-css-has"></a> Pseudo-class `:has()`
### <a name="extended-css-has"></a> Pseudo-class `:has()`

@@ -77,3 +78,3 @@ Draft CSS 4.0 specification describes the [`:has()` pseudo-class](https://www.w3.org/TR/selectors-4/#relational). Unfortunately, [it is not yet supported](https://caniuse.com/css-has) by all popular browsers.

<a id="extended-css-has-limitations"></a> **Limitations and notes**
<a name="extended-css-has-limitations"></a> **Limitations and notes**

@@ -139,3 +140,3 @@ > Usage of the `:has()` pseudo-class is [restricted for some cases (2, 3)](https://bugs.chromium.org/p/chromium/issues/detail?id=669058#c54):

### <a id="extended-css-contains"></a> Pseudo-class `:contains()`
### <a name="extended-css-contains"></a> Pseudo-class `:contains()`

@@ -185,3 +186,3 @@ This pseudo-class principle is very simple: it allows to select the elements that contain specified text or which content matches a specified regular expression. Regexp flags are supported.

### <a id="extended-css-matches-css"></a> Pseudo-class `:matches-css()`
### <a name="extended-css-matches-css"></a> Pseudo-class `:matches-css()`

@@ -238,3 +239,3 @@ Pseudo-class `:matches-css()` allows to match the element by its current style properties. The work of the pseudo-class is based on using the [`Window.getComputedStyle()`](https://developer.mozilla.org/en-US/docs/Web/API/Window/getComputedStyle) method.

### <a id="extended-css-matches-attr"></a> Pseudo-class `:matches-attr()`
### <a name="extended-css-matches-attr"></a> Pseudo-class `:matches-attr()`

@@ -285,3 +286,3 @@ Pseudo-class `:matches-attr()` allows to select an element by its attributes, especially if they are randomized.

### <a id="extended-css-matches-property"></a> Pseudo-class `:matches-property()`
### <a name="extended-css-matches-property"></a> Pseudo-class `:matches-property()`

@@ -344,3 +345,3 @@ Pseudo-class `:matches-property()` allows to select an element by matching its properties.

### <a id="extended-css-xpath"></a> Pseudo-class `:xpath()`
### <a name="extended-css-xpath"></a> Pseudo-class `:xpath()`

@@ -357,3 +358,3 @@ The `:xpath()` pseudo-class allows to select an element by evaluating an XPath expression.

<a id="extended-css-xpath-limitations"></a> **Limitations**
<a name="extended-css-xpath-limitations"></a> **Limitations**

@@ -383,3 +384,3 @@ > `target` can be omitted so it is optional. For any other pseudo-class that would mean "apply to *all* DOM nodes", but in case of `:xpath()` it just means "apply to the *whole* document", and such applying slows elements selecting significantly. That's why rules like `#?#:xpath(expression)` are limited to looking inside the `body` tag. For example, rule `#?#:xpath(//div[@data-st-area=\'Advert\'])` is parsed as `#?#body:xpath(//div[@data-st-area=\'Advert\'])`.

### <a id="extended-css-nth-ancestor"></a> Pseudo-class `:nth-ancestor()`
### <a name="extended-css-nth-ancestor"></a> Pseudo-class `:nth-ancestor()`

@@ -396,3 +397,3 @@ The `:nth-ancestor()` pseudo-class allows to lookup the *nth* ancestor relative to the previously selected element.

<a id="extended-css-nth-ancestor-limitations"></a> **Limitations**
<a name="extended-css-nth-ancestor-limitations"></a> **Limitations**

@@ -423,3 +424,3 @@ > Pseudo-class `:nth-ancestor()` is not supported inside the argument of the [`:not()` pseudo-class](#extended-css-not). It is [one of the known issues](#known-issues).

### <a id="extended-css-upward"></a> Pseudo-class `:upward()`
### <a name="extended-css-upward"></a> Pseudo-class `:upward()`

@@ -438,3 +439,3 @@ The `:upward()` pseudo-class allows to lookup the ancestor relative to the previously selected element.

<a id="extended-css-upward-limitations"></a> **Limitations**
<a name="extended-css-upward-limitations"></a> **Limitations**

@@ -467,3 +468,3 @@ > Pseudo-class `:upward()` is not supported inside the argument of the [`:not()` pseudo-class](#extended-css-not) argument. It is [one of the known issues](#known-issues).

### <a id="remove-pseudos"></a> Pseudo-class `:remove()` and pseudo-property `remove`
### <a name="remove-pseudos"></a> Pseudo-class `:remove()` and pseudo-property `remove`

@@ -483,3 +484,3 @@ Sometimes, it is necessary to remove a matching element instead of hiding it or applying custom styles. In order to do it, you can use the `:remove()` pseudo-class as well as the `remove` pseudo-property.

<a id="extended-css-remove-limitations"></a> **Limitations**
<a name="extended-css-remove-limitations"></a> **Limitations**

@@ -508,3 +509,3 @@ > The `:remove()` pseudo-class is limited to work properly only at the end of selector.

### <a id="extended-css-is"></a> Pseudo-class `:is()`
### <a name="extended-css-is"></a> Pseudo-class `:is()`

@@ -521,3 +522,3 @@ The `:is()` pseudo-class allows to match any element that can be selected by any of selectors passed to it. Invalid selectors are skipped and the pseudo-class deals with valid ones with no error thrown. Our implementation of the [native `:is()` pseudo-class](https://developer.mozilla.org/en-US/docs/Web/CSS/:is).

<a id="extended-css-is-limitations"></a> **Limitations**
<a name="extended-css-is-limitations"></a> **Limitations**

@@ -555,3 +556,3 @@ > Rules with the `:is()` pseudo-class should use the [native implementation of `:is()`](https://developer.mozilla.org/en-US/docs/Web/CSS/:is) if rules use `##` marker and it is possible, i.e. with no other extended selectors inside. To force applying ExtendedCss rules with `:is()`, use `#?#`/`#$?#` marker explicitly.

### <a id="extended-css-not"></a> Pseudo-class `:not()`
### <a name="extended-css-not"></a> Pseudo-class `:not()`

@@ -568,3 +569,3 @@ The `:not()` pseudo-class allows to select elements which are *not matched* by selectors passed as argument. Invalid argument selectors are not allowed and error is to be thrown. Our implementation of the [`:not()` pseudo-class](https://developer.mozilla.org/en-US/docs/Web/CSS/:not).

<a id="extended-css-not-limitations"></a> **Limitations**
<a name="extended-css-not-limitations"></a> **Limitations**

@@ -592,3 +593,3 @@ > Rules with the `:not()` pseudo-class should use the [native implementation of `:not()`](https://developer.mozilla.org/en-US/docs/Web/CSS/:not) if rules use `##` marker and it is possible, i.e. with no other extended selectors inside. To force applying ExtendedCss rules with `:not()`, use `#?#`/`#$?#` marker explicitly.

### <a id="extended-css-if-not"></a> Pseudo-class `:if-not()` (deprecated)
### <a name="extended-css-if-not"></a> Pseudo-class `:if-not()` (deprecated)

@@ -600,3 +601,3 @@ > The `:if-not()` pseudo-class is deprecated and is no longer supported. Rules with it are considered as invalid.

### <a id="selectors-debug-mode"></a> Selectors debugging mode
### <a name="selectors-debug-mode"></a> Selectors debugging mode

@@ -652,7 +653,7 @@ Sometimes, you might need to check the performance of a given selector or a stylesheet. In order to do it without interacting with JavaScript directly, you can use a special `debug` style property. When `ExtendedCss` meets this property, it enables the debugging mode either for a single selector or for all selectors, depending on the `debug` value.

### <a id="extended-css-old-syntax"></a> Backward compatible syntax
### <a name="extended-css-old-syntax"></a> Backward compatible syntax
**Backward compatible syntax is supported but not recommended.**
### <a id="old-syntax-has"></a> Old syntax for pseudo-class `:has()`
### <a name="old-syntax-has"></a> Old syntax for pseudo-class `:has()`

@@ -675,3 +676,3 @@ **Syntax**

### <a id="old-syntax-contains"></a> Old syntax for pseudo-class `:contains()`
### <a name="old-syntax-contains"></a> Old syntax for pseudo-class `:contains()`

@@ -703,3 +704,3 @@ **Syntax**

### <a id="old-syntax-matches-css"></a> Old syntax for pseudo-class `:matches-css()`
### <a name="old-syntax-matches-css"></a> Old syntax for pseudo-class `:matches-css()`

@@ -777,5 +778,5 @@ **Syntax**

### <a id="extended-css-api"></a> API description
### <a name="extended-css-api"></a> API description
#### <a id="extended-css-constructor"></a> Constructor
#### <a name="extended-css-constructor"></a> Constructor

@@ -791,3 +792,3 @@ ```

<a id="ext-css-configuration-interface"></a>
<a name="ext-css-configuration-interface"></a>
where

@@ -832,3 +833,3 @@ ```ts

#### <a id="extended-css-init"></a> Public method `init()`
#### <a name="extended-css-init"></a> Public method `init()`

@@ -840,3 +841,3 @@ The `init()` public method initializes ExtendedCss on a page.

#### <a id="extended-css-apply-dispose"></a> Public methods `apply()` and `dispose()`
#### <a name="extended-css-apply-dispose"></a> Public methods `apply()` and `dispose()`

@@ -861,3 +862,3 @@ After the instance of ExtendedCss is created, it can be applied on the page by the `apply()` method. Its applying also can be stopped and styles are to be restored by the `dispose()` method.

#### <a id="extended-css-query"></a> Public method `query()`
#### <a name="extended-css-query"></a> Public method `query()`
```ts

@@ -876,3 +877,3 @@ /**

#### <a id="extended-css-validate"></a> Public method `validate()`
#### <a name="extended-css-validate"></a> Public method `validate()`

@@ -897,2 +898,8 @@ ```ts

#### <a name="extended-css-version"></a> Public property `EXTENDED_CSS_VERSION`
type: `string`
Current version of ExtendedCss.
### Debugging extended selectors

@@ -919,3 +926,3 @@

## <a id="projects-using-extended-css"></a> Projects using ExtendedCss
## <a name="projects-using-extended-css"></a> Projects using ExtendedCss

@@ -930,3 +937,3 @@ * [CoreLibs](https://github.com/AdguardTeam/CoreLibs) — `Content Script` dist should be updated

### <a id="browser-compatibility"></a> Browser compatibility
### <a name="browser-compatibility"></a> Browser compatibility

@@ -943,3 +950,3 @@ | Browser | Version |

### <a id="known-issues"></a> Known issues
### <a name="known-issues"></a> Known issues

@@ -949,1 +956,11 @@ - `:has()` pseudo-class should take [`<forgiving-relative-selector-list>` as argument](https://github.com/AdguardTeam/ExtendedCss/issues/154)

- `:is()` pseudo-class does not support [complex selectors](https://github.com/AdguardTeam/ExtendedCss/issues/156)
[npm-badge]: https://img.shields.io/npm/v/@adguard/extended-css
[npm-url]: https://www.npmjs.com/package/@adguard/extended-css
[install-size-badge]: https://packagephobia.com/badge?p=@adguard/extended-css
[install-size-url]: https://packagephobia.com/result?p=@adguard/extended-css
[license-badge]: https://img.shields.io/github/license/AdGuardTeam/ExtendedCss
[license-url]: https://github.com/AdguardTeam/ExtendedCss/blob/master/LICENSE

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc