- From: Florian Rivoal <florian@rivoal.net>
- Date: Thu, 21 Aug 2014 23:04:40 +0200
- To: "www-style@w3.org" <www-style@w3.org>
According to the discussion in https://bugzilla.mozilla.org/show_bug.cgi?id=169334 and to how all (modern) implementations behave, ::before and ::after don't work on replaced content, such as images, making the following code a no-op: @document domain("xkcd.com") { @media (hover:none) { #comic img::after { content: attr(title); } } } However, I can't seem to find which spec says this. The best I can find is CSS2.1, section 12.1: "This specification does not fully define the interaction of :before and :after with replaced elements (such as IMG in HTML). This will be defined in more detail in a future specification." However, this is merely saying that how it works in unspecified, not that it is specified not to work. Selectors point back to 2.1, while Image Values and Replaced Content are silent on this topic. If we're happy with this behavior, it should probably be specified somewhere. Alternatively, if we want to let me add the snippet above to my user style sheet on my phone, we need to say how it works :) - Florian
Received on Thursday, 21 August 2014 21:05:07 UTC