Index: pages/filters.html |
=================================================================== |
--- a/pages/filters.html |
+++ b/pages/filters.html |
@@ -242,16 +242,34 @@ |
disabled on <code><fix>example.com</fix></code> using the exception rule |
<code><fix>example.com#@#div.textad</fix></code>.}} {{s103 The combination of these two |
rules has exactly the same effect as the single rule |
<code><fix>~example.com##div.textad</fix></code>.}} {{s104 It is recommended that you use |
exception rules only when you cannot change an overly general element hiding rule, in all the |
other cases limiting this rule to the necessary domains is preferable.}} |
</p> |
+<h3 id="elemhide-emulation">{{elemhide-emulation-title Advanced element hiding}}</h3> |
kzar
2017/07/11 12:56:17
It seems more logical to me to put this new sectio
hub
2017/07/11 22:25:58
make sense
|
+ |
+<p> |
+ {{elemhide-emulation-explanation-p1 Advanced hiding rules will hide elements that matches the CSS selector directly. <code><fix>example.com#?#div.textad</fix></code> will directly hide <code><fix><div></fix></code> elements with the <code><fix>textad</fix></code> class. These filters only exist as <a href="#generic-specific">specific filters</a>: a domain is mandatory.}} |
kzar
2017/07/11 12:56:17
I don't understand what you mean by "matches the C
|
+</p> |
+<p> |
+ {{elemhide-emulation-explanation-p2 <a href="#elemhide_exceptions">Exception rules</a> above can be applied to the advanced hiding rules the same way.}} |
kzar
2017/07/11 12:56:17
This sentence doesn't seem to add much.
hub
2017/07/11 22:25:58
I'll remove this.
|
+</p> |
+<p> |
+ {{elemhide-emulation-explanation-p3 Advanced hiding rules also introduce new pseudo-class selectors for when a plain CSS selector isn't enough. <code><fix>:-abp-has(selector)</fix></code> will select the element whose content match the enclosed selector. <code><fix>:-abp-properties(properties)</fix></code> will match elements based on their CSS style properties.}} |
+</p> |
+<p> |
+ {{elemhide-emulation-explanation-p4 <code><fix>:-abp-properties(properties)</fix></code> will select elements based on properties of their stylesheet. For example, <code><fix>:-abp-properties(width:300px;height:250px;)</fix></code> will select elements that have <code><fix>width</fix></code> and <code><fix>height</fix></code> set to the specified values <code><fix>300px</fix></code> and <code><fix>250px</fix></code> respectively. The <a href="https://adblockplus.org/development-builds/new-css-property-filter-syntax">older syntax</a> for the filters is deprecated and will be automatically converted to the new format ; the syntax to select the style properties remain the same.}} |
kzar
2017/07/11 12:56:17
Nit: It looks wrong to me to put a comma after "Fo
hub
2017/07/11 22:25:58
Acknowledged.
|
+</p> |
+<p> |
+ {{elemhide-emulation-explanation-p5 <code><fix>:-abp-has(selector)</fix></code> will select elements based on their content. For example, <code><fix>:-abp-has(> div > a.advertiser)</fix></code> will select elements that contain as a direct descendant a <code><fix><div></fix></code> that contains an <code><fix><a></fix></code> with the class <code><fix>advertiser</fix></code>. The inner selector matching determine whether the selection occur. It is important that <code><fix>:-abp-has()</fix></code> be applied to a restricted number of elements to avoid performance issues. Like any regular pseudo-class you can combine it with the CSS selector syntax.}} |
kzar
2017/07/11 12:56:17
Perhaps the sentence about limiting the number of
hub
2017/07/11 22:25:58
Acknowledged.
|
+</p> |
+ |
<h3 id="elemhide_simplified">{{s105 Simplified element hiding syntax}}</h3> |
<p>{{s106 Adblock Plus supports simplified element hiding syntax (e.g. <code><fix>#div(id=foo)</fix></code>) for backwards compatibility only. Using this syntax is discouraged, usual CSS selectors are preferred. Support for this syntax might be removed at some point.}}</p> |
<h3 id="generic-specific">{{generic-specific-title Generic / Specific filters}}</h3> |
<p>{{generic-specific-explanation-p1 With the <code><fix>$generichide</fix></code> and <code><fix>$genericblock</fix></code> filter options the distinction between generic and specific filters becomes important.}}</p> |
<p>{{generic-specific-explanation-p2 We classify a filter to be <strong>specific</strong> if it matches one or more domains or matches a sitekey. If a filter has no domains specified (or only domain exceptions) and no sitekey then it counts as <strong>generic</strong>. For example, <code><fix>example.com##div.textad</fix></code> is a specific filter, whereas both <code><fix>##div.textad</fix></code> and <code><fix>~example.com##div.textad</fix></code> are generic.}}</p> |