Creating Sexy Stylesheets

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

6 comments

Comments 1 - 6 of 6 previous next Post a comment

  • + kliehm Martin Kliehm 7 months ago
    Nice, though further information about the features that are already supported by a few browsers would be appreciated. And adding CSS via @import is so evil, see Yahoo's performance research... Otherwise very well written and designed slides.
  • + guest0bfc1 guest0bfc1 9 months ago
    Very nice. Thanks for sharing with the rest of us.
  • + voicon voicon 9 months ago
    Thanks so much! very helpful for me!
  • + gueste6cf93 gueste6cf93 9 months ago
    why sushi?
  • + zuzu zuzu 9 months ago
    I enjoyed this presso at WDS08 - thanks Jina
  • + luxuryluke Luke Dorny 9 months ago
    Nice work. This is great, thanks.
Post a comment
Embed Video
Edit your comment Cancel

39 Favorites

Creating Sexy Stylesheets - Presentation Transcript

  1. Creating Sexy Stylesheets Jina Bolton
  2. Sexy?
  3. Write it clean. Keep it clean.
  4. Clarity is beautiful.
  5. Comments are your friend.
  6. /* Company Name Typography CSS Author Jina Bolton Version v1.0 | 2008-09-25 .................................... */
  7. /* COLORS Background 222 Text fff Links c99 Visited Links 966 Hovered Links fcc Headers 9cc Sub-headers 699 .................................... */
  8. /* =RESET .................................... */ /* =TYPOGRAPHY .................................... */ /* =STRUCTURE .................................... */ See: http://stopdesign.com/log/2005/05/03/css-tip-flags.html
  9. /* STYLESHEET SECTIONS CSS Flags marked with [=] RESET GLOBAL TYPOGRAPHY STRUCTURE FORMS TABLES WIDGETS .................................... */
  10. profile.css #profile { width: 600px; /* redefined: IE-6.css, line 25 */ } IE-6.css #profile { width: 620px; /* override: profile.css, line 270 */ }
  11. Be organised.
  12. @import 'reset.css'; @import 'structure.css'; @import 'typography.css'; @import 'widgets.css';
  13. Readability vs. optimisation
  14. CSS 3
  15. “CSS 3 A giant serving of FAIL ” Alex Russell
  16. “CSS 3 (Third time lucky)” —Andy Clarke
  17. CSS 1 1996
  18. CSS 2 1997
  19. CSS 2.1 Candidate Recommendation
  20. CSS 3
  21. CSS 3 Modules ๏ Sele#ors ๏ Backgrounds & Borders ๏ Multi-column Layout ๏ Advanced Layout ๏ Grid Positioning ๏ Media Queries
  22. Backgrounds & Borders Style any box’s borders and background including attaching multiple background-images to a single element.
  23. Backgrounds & Borders Style any box’s borders and background including attach multiple background-images to a single element.
  24. Backgrounds & Borders <div class=\"vcard\"> <div class=\"addr-bl\"> <div class=\"addr-tr\"> … Style any box’s borders and </div> background including attach multiple </div> </div> background-images to a single element.
  25. .vcard { background: #000 Backgrounds } url(a-grad.gif) repeat-x; & Borders .addr-bl { background: url(a-bl.gif) 100% 0 Style any box’s borders and no-repeat; background including attach multiple } background-images to a single .addr-tr { element. background: url(a-tr.gif) 100% 0 no-repeat; }
  26. Backgrounds & Borders <div class=\"vcard\">…</div> Style any box’s borders and background including attach multiple background-images to a single element.
  27. .vcard { background-color: #000; Backgrounds background-image: url(a-grad.gif), url(a-bl.gif), & Borders url(a-tr.gif); background-repeat: repeat-x, Style any box’s borders and no-repeat, background including attach multiple no-repeat; background-images to a single element. background-position: 0 0, 100% 0, 0 100%; }
  28. Backgrounds & Borders Style any box’s borders and background including attach multiple background-images to a single element.
  29. <div class=\"vcard\">…</div> .vcard { border-image: url(\"border.png\") 30 30 30 30 stretch; border: double green 1em; }
  30. Multi-column Layout Making it simpler to create column layouts without additional markup by using column widths, counts, gaps and rules.
  31. <div class=\"entry-content\"> <div class=\"col first\"> … </div> <div class=\"col\"> … </div> </div>
  32. .entry-content .col { float: left; width: 467px; margin-left: 30px; } .entry-content .first { margin-left: 0; } /* .entry-content clear-fix rules */
  33. <div class=\"entry-content\"> … </div> .entry-content { column-count: 2; column-gap: 30px; }
  34. <div class=\"entry-content\"> … </div> .entry-content { column-width: 270px; column-gap: 30px; }
  35. Grid Positioning Gives the ability to add invisible grid rules to create grid layouts (like in books and newspapers), and uses sizing and new float properties for placing content.
  36. <div class=\"entry-content\"> … </div> .entry-content { column-count: 4; column-gap: 30px; }
  37. .entry-content { grid-columns: (30px * *)[4]; column-count: 4; column-gap: 30px; }
  38. .entry-content { grid-columns: (30px * *)[4]; grid-rows: 9em 33.3% *; column-count: 4; column-gap: 30px; }
  39. <div class=\"entry-content\"> … <img src=\"sushi.jpg\" class=\"photo\" alt=\"\" /> … </div>
  40. .entry-content img.photo { ich float: page bottom left; float-offset: 4gr 1gr; }
  41. <div class=\"entry-content\"> <h2>What is Sushi?</h2> … <img src=\"sushi.jpg\" class=\"photo\" alt=\"\" /> </div>
  42. .entry-content h2 { float: page top left; width: 6gr; height: 1gr; margin-left: -30px; ich } .entry-content img.photo { float: page bottom left; float-offset: 4gr 1gr; }
  43. Advanced Layout Aims to fully separate visual layout order from a document’s content by defining “slots” in a grid in which content can flow or be placed, or that remain empty — all without additional markup.
  44. a b c d e f g h i j k l
  45. a a c d e e g g i j k l
  46. @ @ . . e @ @ h . j j @
  47. Sele#ors Refined sele#ors to target an element based on an attribute or position in the document flow plus new pseudo-classes and pseudo-elements.
  48. Selectors :nth-child(N) :nth-last-child(N) :nth-of-type(N) :nth-last-of-type(N) :last-child :first-of-type :last-of-type :only-child :only-of-type :root :empty :target :enabled :disabled :checked :not(S)
  49. :nth-child(N) matches elements on the basis of their positions within a parent element’s list of child elements (from beginning to end)
  50. <tr class=\"alt\"></tr> <tr></tr> tr.alt td { background: #ecffd9; }
  51. <tr></tr> tr:nth-child(odd) td { background: #ecffd9; }
  52. <tr class=\"high-rank\">…</tr> <tr class=\"high-rank\">…</tr> <tr class=\"high-rank\">…</tr> <tr>…</tr> tr.high-rank td { background: #ecffd9; }
  53. <tr>…</tr> tr:nth-child(-n+3) td { background: #ecffd9; }
  54. :nth-last-child(N) matches elements on the basis of their positions within a parent element’s list of child elements (from end to beginning)
  55. <tr>…</tr> <tr class=\"low-rank\">…</tr> <tr class=\"low-rank\">…</tr> <tr class=\"low-rank\">…</tr> tr.low-rank td { opacity: .75; }
  56. <tr>…</tr> tr:nth-last-child(-n+2) td { opacity: .75; }
  57. :nth-of-type(N) matches elements on the basis of their positions within a parent element’s list of child elements of the same type
  58. <p class=\"intro\">…</p> <p>…</p> p.intro { background: #fafcf5; font-size: 1.3em; color: #060; }
  59. <p>…</p> p:first-of-type { background: #fafcf5; font-size: 1.3em; color: #030; }
  60. Resources
  61. Resources ๏ A List Apart http://alistapart.com ๏ SitePoint CSS Reference http://reference.sitepoint.com/css ๏ CSS3.info http://css3.info ๏ CSS Crib Sheet http://mezzoblue.com/css/cribsheet/
  62. The Art & Science of CSS by Cameron Adams Jina Bolton David Johnson Steve Smith Jonathan Snook
  63. Thank you! Jina Bolton sushiandrobots.com

+ Jina BoltonJina Bolton, 9 months ago

custom

10285 views, 39 favs, 31 embeds more stats

Productivity and efficiency tips for today's CSS de more

More Info

CC Attribution-NonCommercial-ShareAlike LicenseCC Attribution-NonCommercial-ShareAlike LicenseCC Attribution-NonCommercial-ShareAlike License

Go to text version
  • Total Views 10285
    • 8335 on SlideShare
    • 1950 from embeds
  • Comments 6
  • Favorites 39
  • Downloads 295
Most viewed embeds
  • 1070 views on http://creatingsexystylesheets.com
  • 324 views on http://www.webdirections.org
  • 321 views on http://www.sushiandrobots.com
  • 157 views on http://www.creatingsexystylesheets.com
  • 29 views on http://michael.flanagan.ie

more

All embeds
  • 1070 views on http://creatingsexystylesheets.com
  • 324 views on http://www.webdirections.org
  • 321 views on http://www.sushiandrobots.com
  • 157 views on http://www.creatingsexystylesheets.com
  • 29 views on http://michael.flanagan.ie
  • 5 views on http://www.slideshare.net
  • 4 views on http://www.whitepixel.pl
  • 3 views on http://209.85.229.132
  • 3 views on http://62.gmodules.com
  • 3 views on http://blog.signified.com.au
  • 3 views on http://static.slideshare.net
  • 3 views on http://74.125.77.132
  • 3 views on http://sushiandrobots.com
  • 2 views on http://whitepixel.pl
  • 2 views on http://192.168.1.2
  • 2 views on http://feeds.feedburner.com
  • 2 views on http://blog.slideshare.net
  • 1 views on http://74.125.95.132
  • 1 views on http://74.125.79.100
  • 1 views on http://localhost
  • 1 views on http://copyscape.com
  • 1 views on http://74.125.39.132
  • 1 views on http://74.125.43.102
  • 1 views on http://74.125.43.100
  • 1 views on http://209.85.171.104
  • 1 views on http://66.102.9.104
  • 1 views on http://localhost:9007
  • 1 views on http://192.168.1.11
  • 1 views on http://sushimonster.reflectsite.com
  • 1 views on http://lj-toys.com
  • 1 views on http://know.namics.com

less

Flagged as inappropriate Flag as inappropriate
Flag as innappropriate

Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

Cancel

Categories