Re:Learn How to make a Single Element iPhone in CSS3
by redslazer on Saturday September 08, 2012 @02:00AM
(#4492392)
I have never learnt more things in css in such a short time. Seeing someone else go through and seeing them write CSS with live results gave me more insight that the constant rehash of "things you can do with CSS3" . Pausing it playing around with it and the continue the tutorial was amazing.
The practical application seems pretty low but as a way of teaching CSS it was great. If someone knows more tutorials like that please tell me about them.
Re:Learn How to make a Single Element iPhone in CSS3
by anonymouz on Saturday September 08, 2012 @04:16AM
(#4492566)
I find the recent trend to put all kinds of tutorials, introductions, etc. into videos or similar quite off-putting. It is much harder to skim through, or adjust my reading speed to how fast I can comprehend what's being said, which depends on whether I'm looking at some code or watching him type out boilerplate. There is also a tendency to make 10-minute long videos out of things that could be typed into a couple of paragraphs.
That said, this particular instance with it's interactive features is certainly one of the better variants (if you must go with streaming).
Re:Learn How to make a Single Element iPhone in CSS3
by mustardhamsters on Saturday September 08, 2012 @02:30AM
(#4492445)
Definitely. At first I was thinking "okay, another useless CSS trick" then "wait, just one element?" then "why does this read like I'm watching a video?" then I finally found the play button and just sat back and thought "oh my god".
I had no idea those before and after pseudo elements were so powerful, or that box shadows could be that awesome.
Re:Learn How to make a Single Element iPhone in CSS3
by prezjordan on Saturday September 08, 2012 @09:36AM
(#4492908)
I believe(?) this was heavily inspired by TheCodePlayer [1], but I don't see any mention of him around here. He has lots of really nice videos like this.
Re:Learn How to make a Single Element iPhone in CSS3
by WebGate on Sunday September 09, 2012 @10:14PM
(#4497965)
scpécifications the change so quickly, and to adapt to the largest number of users, I think it is preferable to use a wide range of syntaxes..
Isn't it ?
Re:Learn How to make a Single Element iPhone in CSS3
by DenisM on Saturday September 08, 2012 @01:06PM
(#4493348)
Is there a vector-graphics language that similar to CSS in capabilities and expressive power, but with a more approachable syntax?
I think it's very cool when an image is created in essence programmatically, this really speaks to me as a developer, and I certainly appreciate the declarative nature of CSS, but I wish for something that is easier to read, and so easier to maintain over time, including source control with branches/merges etc. An added bonus to such language would be ability to compile it down to CSS, or Objective-C/UIKit, or C#/Windows, or simply render it to static bitmaps...
As someone who doesn't know CSS, I see it similar to the way I see PERL - you can do cool things, but I wouldn't know where to start if I had to change anything, except by trying all things at random.
Re:Learn How to make a Single Element iPhone in CSS3
by uptown on Saturday September 08, 2012 @10:33AM
(#4492997)
It shows the capabilities of creating resolution-independent imagery using CSS. In other words, you can generate non-photographic imagery using CSS that will display with clarity regardless of the DPI of the device it's being viewed on. Got a Retina MBP? It'll look good. Got a non-retina iPad? It'll look good.
It's really powerful stuff, and the trend of user-interfaces is rapidly shifting away from image-heavy UI's to CSS-based UIs which typically download faster, and can be updated in-code without needing to re-slice up a PSD file to accomodate the desired changes.
Re:Learn How to make a Single Element iPhone in CSS3
by FireBeyond on Saturday September 08, 2012 @02:18PM
(#4493549)
What a horrible trend. CSS = Cascading Style Sheet. A tool explicitly designed to de-couple semantics from presentation.
Not to mention it's usually a case of "If you're using a bleeding edge browser beta, but not that browser, only this one".
It's unintuitive for building such things, which is why there's such a "gee whiz" factor, that you don't see when someone draws an iPhone in Adobe Illustrator.
I get the hack, I get the fun. But anyone who seriously advocates for a UI built of CSS bastardizations is "doing it wrong", as they say.
Why not invest that energy in SVG support and tools for browsers? Creative tools will be more powerful and flexible. And it'll "just work".
Re:Learn How to make a Single Element iPhone in CSS3
by bpatrianakos on Saturday September 08, 2012 @07:25PM
(#4494373)
You're taking this whole thing the wrong way. This was not meant as a display of a practical use for css3. What it is, is a display of the potential power of it. It's implied that although you could create graphics in CSS now, you shouldn't.
I disagree with your take on UIs moving toward CSS too. Your parent has an excellent point about not needing to recline PSDs. Now, I'm definitely not saying we should all heavily rely on CSS for every UI element we can but I certainly think its great that we begin to use CSS for more UI elements than before like navigation bars and dropdown menus, buttons, and lots more. There's still is and believe there always will be a need for traditional graphics in UI designs for a long time to come. I think only a fool would suggest that CSS, SVG, and other technologies will replace traditional graphics but at the same time less reliance on traditional graphics is a good thing for everyone from designers to developers and even end users.
The trick is to be smart about their application. Some parts of css3 are supported widely enough to be viable for use as a replacement for some graphics. Traditional graphics can look quite ugly depending on your system while css3 replacements look better. The opposite is also true of CSS looking terrible and not being able to compete with traditional graphics. A good front end developer knows when to use each. Bending CSS in ways it wasn't meant to be bent or using features that have terrible support or are overly hackish/complicated is obviously something we shouldn't do ever but we are getting to a point where these new tech oldies are viable replacements. I applaud the people who create such unrealistic (in the sense that they shouldn't be used in production) demos because by pushing the limits of what something CSS can do means that some of their work will become more widely adopted and supported in browsers. It's e demos that push limits like this that get us to the point where we can reasonably start using CSS3 in place of some UI elements. The language will also evolve to make certain techniques better and easier. It was because of many of the ways we used JavaScript for interaction and design that CSS now includes features like transitions and it can only get better.
Finally, your comment seems to me like it's coming from a place of black or white thinking. It feels to me like you're just shy of saying "We should not use CSS for UI elements and only graphics". I agree with some of your sentiment but I think it's better to embrace most of the new features of CSS while still being smart about their application. A lot of designers and developers will go nuts with them and use them when they shouldn't like when the blink tag and other goodies were first introduced into HTML in the 90's. That's just what happens. But there are still many of us who know that with great power comes great responsibility and won't go around replacing every UI element that used to be a graphic just because we can.
Re:Learn How to make a Single Element iPhone in CSS3
by Timothee on Saturday September 08, 2012 @11:16AM
(#4493088)
Very interesting.
Tiny nitpick: this is more an iPhone 4 than a 4S: the black notch on the top frame is not present with the 4S. (they have one notch at the top of each side) Though to be perfectly accurate, you'll also need two notches at the bottom (one on each side) of the frame as well. ;-)
Re:Learn How to make a Single Element iPhone in CSS3
by uptown on Saturday September 08, 2012 @10:39AM
(#4493004)
Pretty sure you could pull it off using a blended set of CSS linear gradients. Some of the organic swirls you see in wood might be considerably more-difficult to replicate, but you could simulate those to a degree by using sequences of small straight shapes ordered to form a shape that's curved in appearance.
Re:Learn How to make a Single Element iPhone in CSS3
by harel on Saturday September 08, 2012 @09:43AM
(#4492922)
Very brave considering Apple is very trigger happy with the lawsuit gun whenever they see anyone using rounded corners not to mention a full on iPhone image... :)
The practical application seems pretty low but as a way of teaching CSS it was great. If someone knows more tutorials like that please tell me about them.
That said, this particular instance with it's interactive features is certainly one of the better variants (if you must go with streaming).
Not only on CSS3 stuff but on JS, Coffee, SASS, Zen Coding, Markdown, etc. too!
Ill just sub to the feed :)
https://twitter.com/cssdeck
I had no idea those before and after pseudo elements were so powerful, or that box shadows could be that awesome.
[1]: http://thecodeplayer.com/
Unless I'm seriously mistaken; the webcast is using the (fairly old) linear gradient syntax which was removed in FF16.
Or am I missing something?
Spec:
http://dev.w3.org/csswg/css3-images/#linear-gradient-type
In essence, you can't say linear-gradient(top, ....) but need to say linear-gradient(to bottom, ...).
Also, this is my first time seeing cssdeck, and I must tell you how fantastic it is! The experience was great.
I think it's very cool when an image is created in essence programmatically, this really speaks to me as a developer, and I certainly appreciate the declarative nature of CSS, but I wish for something that is easier to read, and so easier to maintain over time, including source control with branches/merges etc. An added bonus to such language would be ability to compile it down to CSS, or Objective-C/UIKit, or C#/Windows, or simply render it to static bitmaps...
As someone who doesn't know CSS, I see it similar to the way I see PERL - you can do cool things, but I wouldn't know where to start if I had to change anything, except by trying all things at random.
Single element CSS hacks like this are impressive demonstrations of technical knowledge, but it was never meant to be used like this.
https://github.com/adamgit/SVGKit/tree/transforms
Perfection!
Edit: I updated the codecast, check it now..
Edit Edit: The square is ridiculously big in Firefox... :-\
It's really powerful stuff, and the trend of user-interfaces is rapidly shifting away from image-heavy UI's to CSS-based UIs which typically download faster, and can be updated in-code without needing to re-slice up a PSD file to accomodate the desired changes.
Not to mention it's usually a case of "If you're using a bleeding edge browser beta, but not that browser, only this one".
It's unintuitive for building such things, which is why there's such a "gee whiz" factor, that you don't see when someone draws an iPhone in Adobe Illustrator.
I get the hack, I get the fun. But anyone who seriously advocates for a UI built of CSS bastardizations is "doing it wrong", as they say.
Why not invest that energy in SVG support and tools for browsers? Creative tools will be more powerful and flexible. And it'll "just work".
I disagree with your take on UIs moving toward CSS too. Your parent has an excellent point about not needing to recline PSDs. Now, I'm definitely not saying we should all heavily rely on CSS for every UI element we can but I certainly think its great that we begin to use CSS for more UI elements than before like navigation bars and dropdown menus, buttons, and lots more. There's still is and believe there always will be a need for traditional graphics in UI designs for a long time to come. I think only a fool would suggest that CSS, SVG, and other technologies will replace traditional graphics but at the same time less reliance on traditional graphics is a good thing for everyone from designers to developers and even end users.
The trick is to be smart about their application. Some parts of css3 are supported widely enough to be viable for use as a replacement for some graphics. Traditional graphics can look quite ugly depending on your system while css3 replacements look better. The opposite is also true of CSS looking terrible and not being able to compete with traditional graphics. A good front end developer knows when to use each. Bending CSS in ways it wasn't meant to be bent or using features that have terrible support or are overly hackish/complicated is obviously something we shouldn't do ever but we are getting to a point where these new tech oldies are viable replacements. I applaud the people who create such unrealistic (in the sense that they shouldn't be used in production) demos because by pushing the limits of what something CSS can do means that some of their work will become more widely adopted and supported in browsers. It's e demos that push limits like this that get us to the point where we can reasonably start using CSS3 in place of some UI elements. The language will also evolve to make certain techniques better and easier. It was because of many of the ways we used JavaScript for interaction and design that CSS now includes features like transitions and it can only get better.
Finally, your comment seems to me like it's coming from a place of black or white thinking. It feels to me like you're just shy of saying "We should not use CSS for UI elements and only graphics". I agree with some of your sentiment but I think it's better to embrace most of the new features of CSS while still being smart about their application. A lot of designers and developers will go nuts with them and use them when they shouldn't like when the blink tag and other goodies were first introduced into HTML in the 90's. That's just what happens. But there are still many of us who know that with great power comes great responsibility and won't go around replacing every UI element that used to be a graphic just because we can.
Just bear in mind that these effects will incur a huge performance hit compared to bitmaps.
Tiny nitpick: this is more an iPhone 4 than a 4S: the black notch on the top frame is not present with the 4S. (they have one notch at the top of each side) Though to be perfectly accurate, you'll also need two notches at the bottom (one on each side) of the frame as well. ;-)
It took me a solid minute to find the "play" button. It was hidden on the other send of the page in the bottom corner in faint color.