Even designers are using CSS3?...

Sean Martell is my hero. He did the Bespin logos and a bunch of the Mozilla works in general. When Ben and I were in Toronto we got to see him at work at his WACOM tablet, and it is a sight to behold.

I wish I could do that kind of design work, but for me it isn't to be.... my design is left to code :

Anyway, he has been working a lot on the Fennec (Firefox mobile) design and just
wrote about using CSS3 to build flexible UI elements without recutting UI graphics all over:

Designing UI elements for a mobile browser has taught me a great deal when it comes to creating interactive graphical elements that are to be used in a very small space. Of course, when I say small space, I mean a small space that has the potential to be different for each handset out there. Not only are we talking resolution differences, but the screen DPI can change from device to device as well.

So after resizing and re-slicing the Fennec UI for the second time, I quickly realized that this could be a full-time job for a team of designers depending on the list of handsets Fennec will be appearing on.

Hold the phone… whats this? Firefox 3.5 enables a new slew of fun CSS3 design styles eh? Rounded edges eh? Embedded fonts eh?

* gears turning, monkeys typing, hamsters running *

What if we could replace almost all of the graphical UI elements within Fennec with CSS created equivalents? As a designer, am I comfortable bypassing Photoshop and letting CSS run the pixel rodeo? After a few initial tests, the answer to both of those questions was a very solid “yes”. A solid “friggin’ right” if in Cape Breton.

Here are some nice dark toggles:


with code looking like:

CSS:
  1. .toggleONleft {
  2. font-family: ‘DroidSans-Bold’;
  3. text-transform:uppercase;
  4. padding: 0px 8px 0px 12px;
  5. -moz-border-radius-topleft: 0.5em;
  6. -moz-border-radius-bottomleft: 0.5em;
  7. -webkit-border-top-left-radius: 0.5em;
  8. -webkit-border-bottom-left-radius: 0.5em;
  9. border-top: 4px solid #aaa;
  10. border-left: 4px solid #ccc;
  11. border-right: 4px solid #ccc;
  12. border-bottom: 4px solid #ccc;
  13. -moz-border-top-colors:#aaa #bbb #ccc #ddd;
  14. -moz-border-left-colors:#aaa #bbb #ccc #ddd;
  15. -moz-border-bottom-colors:#aaa #bbb #ccc #ddd;
  16. -moz-border-right-colors:#aaa #bbb #ccc #ddd;
  17. background-color: #ddd;
  18. display: inline;
  19. }
  20. .toggleOFFright {
  21. font-family: ‘DroidSans-Bold’;
  22. text-transform:uppercase;
  23. color:#414141;
  24. padding: 0px 12px 0px 8px;
  25. -moz-border-radius-topright: 0.5em;
  26. -moz-border-radius-bottomright: 0.5em;
  27. -webkit-border-top-right-radius: 0.5em;
  28. -webkit-border-bottom-right-radius: 0.5em;
  29. border-top: 4px solid #ccc;
  30. border-left: 4px solid #ccc;
  31. border-right: 4px solid #ccc;
  32. border-bottom: 4px solid #aaa;
  33. -moz-border-top-colors:#aaa #fff #fff #fff;
  34. -moz-border-right-colors:#aaa #dedede #efefef #fafafa;
  35. -moz-border-left-colors:#aaa #dedede #efefef #fafafa;
  36. -moz-border-bottom-colors:#aaa #dedede #efefef #fafafa;
  37. background-color: #fff;
  38. display: inline;
  39. }

If you have better solution, just tell me !

0 comments: