View Single Post
Old 01-27-2021, 12:48 PM   #9
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,544
Karma: 5703586
Join Date: Nov 2009
Device: many
FWIW, Yes that feature in Sigil was designed to just handle element.class and .class selectors and not combinators and to take you to the first definition of the class if found in a linked stylesheet. The user would have to search the stylesheet for other places that class is defined or used. But that is typically easy to do once the Stylesheet tab is opened especially when only a single stylesheet is linked.

It is not a full query done by selector. It was designed to help in the majority of user cases that involve simple selectors and not meant for use with more advanced combinator or pseudoclass selectors.

The Preview Inspector can be used to determine the exact selectors used.

IMHO, the designers of CSS have completely forgotten the KISS engineering principle (and I could say the same for the epub3 spec, the html5 spec, etc!).

Simple combinations of elements and classees can handle almost all cases especially when class attributes can be easily added to the epub xhtml source by the epub developer unlike when iframes and injected ad blocks are used where classes can not be easily added and therefore combinators must be used to handle things.

FWIW, Sigil has just added its own version of gumbo query and fixed a number of bugs to help it determine if even complex css selectors apply to a specific node. So improvements for this feature in Sigil are coming but as Kovid said, there is no way to handle all cases.
KevinH is online now   Reply With Quote