4 ms·
The :target pseudoclass is used, along with anchors. It means that it also pollutes the browser history, which is somewhat appropriate for modals, but probably
by steventhedev 10y ago
The :target pseudoclass is used, along with anchors. It means that it also pollutes the browser history, which is somewhat appropriate for modals, but probably not what you want.
Still neat though.
- jordanwallwork 10y agoHow does the browser know which modal is targetted though? I thought :target had to match the hash, but both links just link to # :S
- jordanwallwork 10y agoAh forget that, as usual it's immediately obvious after I post that I don't understand! Looks like I had a bit of a mental block and couldn't see the top buttons for some reason - I was looking at the close links. Yup that all makes sense now then