News for hackers. Stuff that matters.
Re:Single Element MacBook Pro with CSS by MattBearman on Wednesday August 15, 2012 @04:26AM (#4385114)
While undoubtedly impressive, I think using css :before and :after kind of defeats the point of 'single element'
Re:Single Element MacBook Pro with CSS by JCB_K on Wednesday August 15, 2012 @04:30AM (#4385119)
No it doesn't really, it keeps your HTML clean. Sure, there's better ways of getting a MacBook into your webpage, but this definitely shows the power of the :before and :after selectors.
Re:Single Element MacBook Pro with CSS by fredley on Wednesday August 15, 2012 @04:40AM (#4385140)
It may keep your HTML clean, but it makes your CSS messy!
Re:Single Element MacBook Pro with CSS by JCB_K on Wednesday August 15, 2012 @05:18AM (#4385215)
That's why I said there's better ways of getting a MacBook into your webpage. But my point still stands, :before and :after are very powerful.
Re:Single Element MacBook Pro with CSS by MatthewPhillips on Wednesday August 15, 2012 @08:38AM (#4385621)
I'd much rather have clean, reusable HTML. CSS you can use preprocessors to abstract away the messiness.
Re:Single Element MacBook Pro with CSS by lolsal on Wednesday August 15, 2012 @10:33AM (#4386113)
Aren't you using templates and macros for HTML already?
Re:Single Element MacBook Pro with CSS by Groxx on Wednesday August 15, 2012 @12:19PM (#4386704)
Changing how the HTML macros expand likely ends up requiring CSS changes (in practice, though not necessarily in a theoretically-ideal code base). One change in two places, vs one change in one place.
Re:Single Element MacBook Pro with CSS by MatthewPhillips on Wednesday August 15, 2012 @03:08PM (#4387609)
No, I typically write entirely client side applications.
Re:Single Element MacBook Pro with CSS by tobyjsullivan on Wednesday August 15, 2012 @06:39PM (#4388675)
Any reading recommendations for someone who isn't?
Re:Single Element MacBook Pro with CSS by arnarbi on Wednesday August 15, 2012 @02:50PM (#4387514)
> No it doesn't really, it keeps your HTML clean.

You can also keep your kitchen clean by stuffing all the dirty stuff into the cupboards.

Re:Single Element MacBook Pro with CSS by joshnh on Wednesday August 15, 2012 @07:04AM (#4385389)
The thing to keep in mind is that the use of pseudo-elements keeps the style separate from the content. In terms of practicality, there isn't much; I did this as an experiment in semantics and the latest CSS properties and techniques.