Hacker Newsnew | comments | show | ask | jobs | submit login

Slightly offtopic, but when would you want to use a :before ?

It looks something out of CSS:the bad parts,ie looks very hacky but apparently is standard.




If for some design reason you wanted to add curly quotes around all links “” or perhaps display an attribute of the link as a hover-able tooltip, it would be better to use pseudo elements rather than adding content for the sake of the design.

Things that are subject to change and attributed to design choices rather than content choices are much easier to add and remove via `:before` or `:after` vs. going through the code and adding or removing elements.

-----




Applications are open for YC Winter 2016

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact

Search: