Case in point, in a recent conversation with Sarven I was asked whether I thought the
:hover pseudo-class in CSS belonged to the presentational or behavioural layer. After all, to “hover” is to perform an action, and an action is behavioural by it’s very nature. So why is the
style property collection. So in effect you can affect the document’s behaviour through the presentational layer and vice versa. This then begs to ask: what belongs where?
Well, let’s deal with CSS first. After being asked Sarven’s question I thought about it for a moment and realized that no, in fact, the
:hover pseudo-class is not so much a behaviour in and of itself as its a behavioural hook exposed to the presentational layer for the purpose of styling elements that find themselves in a “hover” state. In other words, CSS doesn’t handle the behaviour, the browser does. CSS is simply being allowed–by the browser–to style an element that’s in a hover state.
display attribute value from
Read more from the archive.