[ACCEPTED]-CSS selector to get deepest element of specific class in the HTML tree-css-selectors
Accepted answer
You can use the jQuery selector .rowsLayout:not(:has(.rowsLayout))
.
However, for 6 performance reasons, this is not possible in CSS.
Your selector depends 5 on the children (or lack thereof) of the elements 4 that you target.
CSS is designed so that 3 an element's selectors can always be resolved 2 before the element's children exist; this 1 allows CSS to be applied as a document loads.
No.
Your options are: select them by id; add 4 a second class for those leaves, and select 3 by that class; use a javascript-based solution 2 to set the appropriate styling (possibly 1 using the second class).
Source:
stackoverflow.com
More Related questions
Cookie Warning
We use cookies to improve the performance of the site. By staying on our site, you agree to the terms of use of cookies.