• Steve
    link
    English
    4
    edit-2
    1 year ago

    There is this css pseudo class called :has() which lets you target an element if it has the children or siblings you select. Firefox is the only browser that doesn’t support it yet. It’s interesting because it’s probably the most powerful selector ive seen in my whole career because it essentially lets you reverse the selector traversal direction. I wonder how much supporting this affects the render speed. It’s probably trivial compared to the js engines but I wonder nonetheless

    https://developer.mozilla.org/en-US/docs/Web/CSS/:has