Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #36520


    another glitch we seem to notice: when we try to use :after pseudoelements on elements using :last-child / :last-of-type or negations thereof, the result is that:
    all elements, including the last element match the negation
    none matches the :last-child or :last-of-type

    <style type="text/css"> .mainwrapper > div:not(:last-of-type):after { content: '|' } .mainwrapper > div::last-of-type:after { content: '<' } .mainwrapper > div:not(:last-of-type) > span:after { content: '>' } </style> <div class="mainwrapper"> <div>Text start <span>(inner)</span></div> <div>Text middle <span>(inner)</span></div> <div>Text last <span>(inner)</span></div> </div>

    Are these selectors be supported in principle?

    Thank you


    I’m afraid that :last-child and :last-of-type won’t be supported without a complete refactoring of the CSS runtime.

    Support requires either an additional parsing pass of entire HTML document, or non-trivial look-ahead parsing logic (in extreme cases, it takes even more time/resources than a second parsing pass).

    All our attempts to implement this feature resulted in significant performance degradation even in simple cases where this feature was not used. We have decided to temporarily omit the feature

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.