mirror of
https://github.com/AdguardTeam/AdguardKnowledgeBase.git
synced 2025-02-20 11:13:10 +08:00
:remove() -> :remove()
(add backticks) (#962)
* :remove() -> `:remove()` (add backticks) * Update 01.general/02.how-to-create-your-own-ad-filters/docs.en.md * Update 01.general/02.how-to-create-your-own-ad-filters/docs.en.md * Update 01.general/02.how-to-create-your-own-ad-filters/docs.en.md * Update 01.general/02.how-to-create-your-own-ad-filters/docs.en.md Small modification to keep consistency after the changes made by @nataMai. Co-authored-by: nataMai <93381653+nataMai@users.noreply.github.com>
This commit is contained in:
parent
a640c1a8ae
commit
dc1fcdfd9e
@ -84,7 +84,7 @@ visible: true
|
||||
* [Pseudo-class `:xpath()`](#extended-css-xpath)
|
||||
* [Pseudo-class `:nth-ancestor()`](#extended-css-nth-ancestor)
|
||||
* [Pseudo-class `:upward()`](#extended-css-upward)
|
||||
* [Pseudo-class :remove() and pseudo-property `remove`](#remove-pseudos)
|
||||
* [Pseudo-class `:remove()` and pseudo-property `remove`](#remove-pseudos)
|
||||
* [Cosmetic rules priority](#cosmetic-rules-priority)
|
||||
* [HTML filtering rules](#html-filtering-rules)
|
||||
* [Syntax](#html-filtering-rules-syntax)
|
||||
@ -1658,7 +1658,7 @@ div:matches-property("memoizedProps._owner.src"="/ad/")
|
||||
|
||||
This pseudo-class allows to select an element by evaluating an XPath expression.
|
||||
|
||||
> **Limited to work properly only at the end of selector, except of [pseudo-class :remove()](#remove-pseudos).**
|
||||
> **Can be placed only at the end of a selector, except for [pseudo-class `:remove()`](#remove-pseudos).**
|
||||
|
||||
The `:xpath()` pseudo-class is different from other pseudo-classes. Whereas all other operators are used to filter down a resultset of elements, the `:xpath()` operator can be used both to create a new resultset or filter down an existing one. For this reason, subject `selector` is optional. For example, an `:xpath()` operator could be used to create a new resultset consisting of all ancestor elements of a subject element, something not otherwise possible with either plain CSS selectors or other procedural operators.
|
||||
|
||||
@ -1687,7 +1687,7 @@ This pseudo-class allows to lookup the nth ancestor relative to the currently se
|
||||
|
||||
It is a low-overhead equivalent to `:xpath(..[/..]*)`.
|
||||
|
||||
> **Limited to work properly only at the end of selector, except of [pseudo-class :remove()](#remove-pseudos).**
|
||||
> **Can be placed only at the end of a selector, except for [pseudo-class `:remove()`](#remove-pseudos).**
|
||||
|
||||
**Syntax**
|
||||
```
|
||||
@ -1708,7 +1708,7 @@ div:has-text(/test/):nth-ancestor(2)
|
||||
|
||||
This pseudo-class allows to lookup the ancestor relative to the currently selected node.
|
||||
|
||||
> **Limited to work properly only at the end of selector, except of [pseudo-class :remove()](#remove-pseudos).**
|
||||
> **Can be placed only at the end of a selector, except for [pseudo-class `:remove()`](#remove-pseudos).**
|
||||
|
||||
**Syntax**
|
||||
```
|
||||
@ -1736,7 +1736,7 @@ div:has-text(/test/):upward(2)
|
||||
|
||||
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 pseudo-class `:remove()` as well as pseudo-property `remove`.
|
||||
|
||||
> **Pseudo-class `:remove()` is limited to work properly only at the end of selector.**
|
||||
> **Pseudo-class `:remove()` can be placed only at the end of a selector.**
|
||||
|
||||
**Syntax**
|
||||
```
|
||||
|
@ -1651,7 +1651,7 @@ div:matches-property("memoizedProps._owner.src"="/ad/")
|
||||
|
||||
Этот псевдокласс позволяет выбирать элементы согласно Xpath выражению.
|
||||
|
||||
> **Может быть только в конце выражения, за исключением использования [псевдокласса :remove()](#remove-pseudos).**
|
||||
> **Может быть только в конце выражения, за исключением использования [псевдокласса `:remove()`](#remove-pseudos).**
|
||||
|
||||
Этот псевдокласс отличается от других тем, что он может использоваться не только для фильтрации текущей выборки элементов, но и для расширения или создания новой. По этой причине `selector` является необязательным параметром. Например, выражение `:xpath()` может использоваться для выбора всех родительских элементов, что невозможно было бы сделать с помощью css-селекторов.
|
||||
|
||||
@ -1680,7 +1680,7 @@ facebook.com##:xpath(//div[@id="stream_pagelet"]//div[starts-with(@id,"hyperfeed
|
||||
|
||||
Это своего рода эквивалент `:xpath(..[/..]*)`.
|
||||
|
||||
> **Может быть только в конце выражения, за исключением использования [псевдокласса :remove()](#remove-pseudos).**
|
||||
> **Может быть только в конце выражения, за исключением использования [псевдокласса `:remove()`](#remove-pseudos).**
|
||||
|
||||
**Синтаксис**
|
||||
```
|
||||
@ -1701,7 +1701,7 @@ div:has-text(/test/):nth-ancestor(2)
|
||||
|
||||
Этот псевдокласс позволяет выбирать ближайшие родительские элементы относительно указанного элемента.
|
||||
|
||||
> **Может быть только в конце выражения, за исключением использования [псевдокласса :remove()](#remove-pseudos).**
|
||||
> **Может быть только в конце выражения, за исключением использования [псевдокласса `:remove()`](#remove-pseudos).**
|
||||
|
||||
**Синтаксис**
|
||||
```
|
||||
@ -1727,7 +1727,7 @@ div:has-text(/test/):upward(2)
|
||||
<a id="remove-pseudos"></a>
|
||||
##### Псевдокласс `:remove()` и псевдо-свойство `remove`
|
||||
|
||||
Иногда необходимо именно удалить определенный элемент, а не просто скрыть его или применить какие-либо правила стиля. В таких случаях можно использовать псевдокласс`:remove()` или псевдо-свойство `remove`.
|
||||
Иногда необходимо именно удалить определенный элемент, а не просто скрыть его или применить какие-либо правила стиля. В таких случаях можно использовать псевдокласс `:remove()` или псевдо-свойство `remove`.
|
||||
|
||||
> **Псевдо-класс `:remove()` может быть только в конце выражения.**
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user