Add cursor image when using pointer-events: none

Is this fake/outdated info?
Add CSS cursor property when using “pointer-events: none” - Stack Overflow
It doesn’t make sense in any way, and I can’t seem to replicate this behaviour (on msedge).

And even if this behaviour applied to non-edge browsers, it does not make sense - why would a parent’s attribute override the child’s attributes?

This seems to work for me. Can you give us an example of when it isn’t working for you? Perhaps put an example in codepen or a link to the project you are working on.

not ‘override’ but ‘cascade’
This language is called cascading stylesheets for a reason…
The parent element’s style block cascades down to its children.
(that’s why if you set for eg the font-size on a body element , it affects all the children elements like paragraph etc)

But logically, wouldn’t a direct target be more important/have higher priority than an indirect (cascading) one?

If I had set all divs to background-color of green, it would make sense to be able to set an anomalous div to have a different color, using it’s ID as a selector.

Note, this actually seems to be the behaviour in many other cases EXCEPT the case I mentioned. Why is this?

Thank you for trying to help, but I’m mainly focused on the issue of an indirect selector overriding a direct selector, or more specifically, the current case we are considering.

(I’m sure this is just an MSEdge issue, or FCC, or I pasted something wrong; it doesn’t really matter at this point to me)

it depends on when you set it also.
If the parent target comes after (below) the other one, then it overrides it.
(not sure if that is the case here without looking at the code)

1 Like

here’s an article on css specificity.
To be honest, I have never had to worry about this much detail when writing code but I’ve not written webpages professionally without some help from others who are more versed in css so maybe I’m just inexperienced with the importance of this.

1 Like

Thank you thank you thank you

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.