the system of classification of selectors in Element Hiding

Discussion on adblockplus.org website and translations

the system of classification of selectors in Element Hiding

Postby maybee » Mon Dec 20, 2010 11:29 pm

this is the the system of classification of selectors in W3C CSS specification.

A simple selector is either a type selector, universal selector, attribute selector, class selector, ID selector, or pseudo-class.

The elements of a document tree that are represented by a selector are the subjects of the selector. A selector consisting of a single sequence of simple selectors represents any element satisfying its requirements. Prepending another sequence of simple selectors and a combinator to a sequence imposes additional matching constraints, so the subjects of a selector are always a subset of the elements represented by the last sequence of simple selectors.


1. simple selector
  1. type selector, universal selector, attribute selector, class selector, ID selector
  2. pseudo-class
2. combinator

according to the the page of filter writting selectors are assorted into three groups like this :
# Element hiding : https://adblockplus.org/en/filters

  1. Basic rules (=simple selector)
  2. Attribute selectors (=simple selector)
  3. Advanced selectors (=combinator)


the the system of classification of selectors in Element hiding is different from that of W3C CSS specification.
I wonder how the system of classification of selectors is categorized in Element hiding? Especially Attribute selectors are being categorized into one category.
and which is first/last-child(pseudo-class) categorized in Element hiding?
maybee
 
Posts: 130
Joined: Sun Jan 17, 2010 8:48 pm

Re: the system of classification of selectors in Element Hiding

Postby Wladimir Palant » Tue Dec 21, 2010 3:47 pm

The documentation here is not about formal categorization. "Basic rules" is what people will usually use, that's also what the browsers can process most efficiently. Selectors based on untypical attributes are far less common. And everything beyond that is really for exceptional cases only.
Wladimir Palant
ABP Developer
 
Posts: 8397
Joined: Fri Jun 09, 2006 6:59 pm
Location: Cologne, Germany

Re: the system of classification of selectors in Element Hiding

Postby maybee » Wed Dec 22, 2010 7:53 am

It seems Basic rules and Attribute selectors are displayed in basic mode and the other selectors are displayed in advanced mode. I think Attribute selectors are also important entries along with basic rules in basic mode and it is worth categorizing it into one group.

Q. Can first/last-child(pseudo-class) be categorized into Advanced selectors?
maybee
 
Posts: 130
Joined: Sun Jan 17, 2010 8:48 pm

Re: the system of classification of selectors in Element Hiding

Postby Wladimir Palant » Wed Dec 22, 2010 12:11 pm

Again, the purpose of this documentation is explanation, not categorization. If you want a spec you go to W3C.
Wladimir Palant
ABP Developer
 
Posts: 8397
Joined: Fri Jun 09, 2006 6:59 pm
Location: Cologne, Germany

Re: the system of classification of selectors in Element Hiding

Postby maybee » Wed Dec 22, 2010 1:16 pm

Ok, thank you for reply. :P
maybee
 
Posts: 130
Joined: Sun Jan 17, 2010 8:48 pm


Return to Website and translations

Who is online

Users browsing this forum: No registered users and 1 guest