Live data from Hacker News

Single Element MacBook Pro with CSS

codepen.io

51–60 of 69 posts

Re: Single Element MacBook Pro with CSS

#53
post #46

Earlier quoted context omitted.

This should be an SVG. Using box-shadows to create shapes is not only confusing but really, really performance-draining. (not to be a downer, it's incredibly impressive, but not something you should do in production code)

SVG fills me with dread. Canvas, maybe.

I love SVG.

Re: Single Element MacBook Pro with CSS

#57
post #4

While undoubtedly impressive, I think using css :before and :after kind of defeats the point of 'single element'

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.

> 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

#58
post #43

Earlier quoted context omitted.

I'd much rather have clean, reusable HTML. CSS you can use preprocessors to abstract away the messiness.

Aren't you using templates and macros for HTML already?

No, I typically write entirely client side applications.

Re: Single Element MacBook Pro with CSS

#60

Wow. There have been many of these "Look what I can do in CSS" articles lately, and frankly, they are normally quite boring. However this is the first time I have ever gone "wow". Very impressive. Quite useless really, but good work.

A pure hack if there ever was one.
Post reply on HN