A Single Div
a.singlediv.com
a.singlediv.com
But it's beautiful and clever, and if you truly can't appreciate it, that's sad.
Edit: Changed link
There's a lot of ads on the page , so maybe that's why.
Here's another one
You're probably right though. It's the ad-heavy pages that always seem to cause problems.
Interesting. Is it as sad as the fact that one still cannot vertically center a div in CSS without using elaborate hacks?
http://philipwalton.github.io/solved-by-flexbox/demos/vertic...
Until most IE users upgrade to 11, it's not usable by those of us who can't exclude a large chunk of our users.
Though quirksmode does go into more detailed analysis in places which can be pretty useful, particularly for when you are stuck supporting legacy browsers, so caniuse isn't a complete drop-in replacement.
caniuse is good for "is there a chance this will work?" or "could I use $some_feature in my new project?", quirksmode is "why doesn't my use of $some_feature work in $pile_of_shit_browser?!?!?!!!"
https://gist.github.com/acdha/a91a46706de02c37566a
This is a little tedious but a CSS preprocessor makes it pretty easy and you only need to do it once for something this simple.
Since Microsoft is pushing automatic upgrades to IE11 hard for security reasons, I see over 80% of our users having a browser which supports flexbox. At that point, it's a manageable problem because you can deploy http://flexiejs.com/ for the people who are prevented by corporate policy from upgrading.
Also you might want outer div to fit the space it lies in and height: 100% does not always work.
Basically somewhere around transition from IE to Firefox and from transitional to strict DOCTYPE tables were broken beyond repair for layout purposes. We have not recovered since. Flexbox brings some hope but not necessarily salvation.
http://wiki.postgresql.org/wiki/Transactional_DDL_in_Postgre...
Traditionally, HTML layouts are not designed to specify any kind of vertical behavior. There is no "vertical" in HTML. How the interface works (your browser) and how it is used (up-down scrolling) naturally imposed a scaling on width, not on height.
Traditionally, people used tables for layout and <blink> tags for emphasis. That doesn't make it right, either.
Nice demo by the way, but why on earth did you use an id rather than a class?
It's trivial to do if you can use flexbox. And I do mean trivial, we're talking 3 properties including "opting into" flexbox: http://jsfiddle.net/1vd9xLdy/ (note: didn't bother with prefixes or older syntaxes so IE >= 11, Firefox >= 28, Chrome >= 29, Opera 12.1 or >= 19)
Flex box is great, but it's interesting that CSS implemented gaussian blurred inset shadows and 3d transforms before it addressed centering (incompletely).
http://jsfiddle.net/talmand/tb9NZ/
I now see that the jQuery plugin that inspired me now has a commercial license. I would have never considered monetizing something so easily created if you know how such things work. Granted, the jQuery plugin does have a few more features.
Any of you busily shouting high from the mountaintops how this is useless and pointless and stupid and derf, don'tyouknowthisisn'tpractical should stop well short of daring to call yourselves engineers, and even shorter of calling yourselves creators, for a key tenet of a great engineer is occasionally looking at absurd challenges and seeing if they can make something happen.
I'm glad most of this trash has since been downvoted into oblivion where it belongs.
Now, through a series of seriously horrendous CSS hacks, they display as really nice flat design green checks and crosses. Given that this dashboard only ever displays in literally one browser, on one big screen, it was completely acceptable to use CSS hacks to achieve the look I wanted.
It was sites such as this one that helped me figure out how to twist a single HTML element into what I needed. Particular shout-out to http://nicolasgallagher.com/pure-css-gui-icons/demo/
Sure, if that absurd challenge has some benefit to someone out there. This is not true for CSS-only artwork. There are no applications for this.
Show me one instance where this is actually applicable and more semantically appropriate than embedding an SVG and I'll shut up for life.
Remember your first novelty hack?
Plus, I guess I'm sorry the masses don't find some articles as fascinating as you?
It's all relative.
It's a website for the demoscene, where people do stuff like this https://www.youtube.com/watch?v=wqu_IpkOYBg in 177 kilobytes.
- chaos theory - https://www.youtube.com/watch?v=ZfuierUvx1A
- turtles all the way down - sub dream https://www.youtube.com/watch?v=z48t2R2hEJM
- the timeless — https://www.youtube.com/watch?v=lwFVlNytq0Q
- turtles all the way down - brain control - https://www.youtube.com/watch?v=sBKmqkh9bb8
As far as the Farbrausch comment, I think the appeal of Debris, in particular, is the stunning audio component of the demo. Chaos Theory is beautiful, but the audio/video components don't feel as tightly integrated as some of Farbrausch's work.
Compare a hack like this to what people were doing back when even something like copper bars was seen as being pretty cool. Don't compare people doing the equivalent of display hacks using a relatively new technology to what the culture around display hacks grew into after several decades of active fermentation. That'd be right up there with poo-pooing a local recreational sports league because the players aren't as good as what you're used to seeing in the professional leagues on TV.
Makes me wonder if we'll begin to see icon/image libraries released with pure css versions.
The whole "[something] in pure CSS" began when people realized how awful table-based layouts are. First it was layouts, then full-blown designs.
This is almost like the most extreme version of that trend, almost to the point of parody.
It seems like CSS has many of the same possibilities as SVG, although expressed a bit more obscurely. But I can imagine that an SVG-to-CSS converter would be possible.
#mario-mushroom div {
width: 170px;
height: 140px;
margin-left: -85px;
margin-top: -90px;
background-image: radial-gradient(circle at 50% 120%, rgba(0,0,0,0.7) 23%, rgba(0,0,0,0) 48%), linear-gradient(30deg, rgba(0,0,0,0.4) 10%, rgba(0,0,0,0) 20%), radial-gradient(circle at 50% 33%, #f8f6f7 32%, rgba(255,255,255,0) 32%), radial-gradient(circle at -13% 55%, #f8f6f7 20%, rgba(255,255,255,0) 20%), radial-gradient(circle at 113% 55%, #f8f6f7 20%, rgba(255,255,255,0) 20%), linear-gradient(to bottom, #ef0015 20%, #b2000c 100%);
border-radius: 140px 140px 80px 80px;
} #camera div:after {
width: 100px;
height: 100px;
margin-left: -20px;
top: 15px;
left: 50%;
z-index: 3;
background: linear-gradient(45deg, #ccc 40%, #ddd 100%);
border-radius: 50%;
box-shadow: 0 3px 2px #999, 1px -2px 0 white, -1px -3px 2px #555, 0 0 0 15px #c2c2c2, 0 -2px 0 15px white, -2px -5px 1px 17px #666, 0 10px 10px 15px rgba(0,0,0,0.3), -90px -51px 1px -43px #aaa, -90px -50px 1px -40px #888, -90px -51px 0 -34px #ccc, -90px -50px 0 -30px #aaa, -90px -48px 1px -28px rgba(0,0,0,0.2), -124px -73px 1px -48px #eee, -125px -72px 0 -46px #666, -85px -73px 1px -48px #eee, -86px -72px 0 -46px #666, 42px -82px 1px -48px #eee, 41px -81px 0 -46px #777, 67px -73px 1px -48px #eee, 66px -72px 0 -46px #666, -46px -86px 1px -45px #444, -44px -87px 0 -38px #333, -44px -86px 0 -37px #ccc, -44px -85px 0 -34px #999, 14px -89px 1px -48px #eee, 12px -84px 1px -48px #999, 23px -85px 0 -47px #444, 23px -87px 0 -46px #888;
}
Neat results -- I'm not sure how practical these specific techniques are to everyday development, but of course a project like this provides the creator with a strong motivation to seriously master everything available in CSS; and the end result of that has obvious practical use.Besides that, this is HackerNews; it's relevant.
Don't let the SVG naysayers get you down. Yes SVG would have been a better tool for the job but its not about that, its about pushing CSS to it's a limits and that what you've done. This is an awesome hack!
IE9 is not fully supported. And doesn't support IE8 and below.
But It's still wonderful.
box-shadow: 8px 0 #312114, 38px 0 #312114;> Don't worry folks, I do know what SVG is. ;)
Let's pretend people didn't ever make contests of do X in assembly|binay|electronics... Or one liners contests, or blanckspace coding sprints.
What's the point of learning Haskell, if you're never gonna realistically find work with it?
Some things are just fun to do, and stretch the limits of what we can do.
Not everything has to have a real use case "point".
boom. see more here: http://www.polymer-project.org/components/paper-elements/dem...
If CSS were just another layout engine for just another platform, people would laugh it out of the room and not bother with this kind of artistic stunts.
CSS does not deserve the kind of respect that would go into this sort of craftmanship.
I always thought html5 solved it, but then came bootstrap and got us back to div-hell.
For the lollypop shadow I would make use of the 3D transformation capabilities of CSS3. AFAIK svg is only capable of affine transformations (why?) while CSS3 can handle perspective transformations too.
It forced her to search through everything possible in CSS (an obviously-limited medium), and get creative to convince it to draw these.
You can embed svg elements directly into html.
Working within constraints is fun. Art is fun.