SlideShare a Scribd company logo
Managing CSS for a

BIG ASS
WEBSITE
    – at Netlog –
     Lennart Schoors
Me
. web designer at Netlog
 http://www.netlog.com


. blog at http://lensco.be
Netlog
How big is big ass?
. 100.000.000 visitors/month
. 3.000.000.000 pageviews/month
. more than 1.500 templates
. lots of traffic & lots of different pages
. 3 designers (vs. ~15 developers)
Environment
Staging                 Live
 . full, commented       . minified
 . seperate files        . concatenated
 . about 60 CSS files    . about 40 CSS files
 . in SVN                . 3-4 files/page max
                         . served from CDN
Framework
netlog.css
. the engine
. about 150kb
. used sitewide on nearly every page
netlog.css consists of          (1/3)

 . netlog.core.css
    . css reset, typography (all of it), basic
     elements & headings, common classes
     like left, right, clearfix, clear, lists, …
 . netlog.common.css
    . "grid", boxes, building blocks &
     widgets, navigation, tabs, status
     messages, dialogs
netlog.css consists of              (2/3)

 . netlog.icons.css & netlog.ui.css
    . images sprites
    . use text clippings to expand “icon” to
    <img src="{top.__static}/s/i/common/blank.gif"
    class="icon icon " alt="" />
Managing CSS for a big ass website - at Netlog
bonus tip
. hover & selected states for icon sprites
 <img src="{top.__static}/s/i/common/blank.gif"
 class="icon iconDelete iconOn" alt="" />
 <img src="{top.__static}/s/i/common/blank.gif"
 class="icon iconDeleteAlt iconOff" alt="" />
netlog.css consists of        (3/3)

 . netlog.wrapper.css
    . header & footer styles
 . netlog.forms.css
    . buttons & inputs, form layouts, …
 . netlog.ads.css
Other files
 . seperate file per “vertical”
 . seperate files for certain features
 . IE6 & IE7 styles via conditional comments
 . Right-to-left styles for RTL languages
 . mobile
 . external widgets
Our code
. lots of comments
. headings & subheadings
. indentation
Managing CSS for a big ass website - at Netlog
. emphasis on classes & combing them
<a href="/foo" class="button buttonSmall buttonRed
buttonCapitals inline">bar</a>



. shift the load from always downloaded
  CSS to take-what-you-need HTML
. “new pages don't need new css”
Some call it ...



“OOCSS”
... but CSS is not programming ;-)
Deploying
Deploy script
. check diff
. combines & minifies specified files
. rsync to our servers
. sync to CDN
Dealing with cache
. deploy bumps version number in config
 http://v.netlogstatic.com/v6.00/3077/s/c/netlog.css



. now global, soon per file
That’s all folks!
Questions?




Read on at http://lensco.be

More Related Content

PPT
PPTX
Web programming css
PPT
Twitter bootstrap (css, components and javascript)
PDF
Introduction to Twitter Bootstrap 3.0.3
KEY
Advanced sass
PPTX
CSS introduction
PPTX
Intro to css
PPT
Boostrap basics
Web programming css
Twitter bootstrap (css, components and javascript)
Introduction to Twitter Bootstrap 3.0.3
Advanced sass
CSS introduction
Intro to css
Boostrap basics

What's hot (10)

PDF
Fundamental CSS3
PPT
PPTX
Css3 Presetation
PDF
Creative Web 2 - CSS
PPT
Twitter bootstrap training_session_ppt
PPTX
html & css
PPTX
Html Styles-CSS
PPTX
Lecture 1
PDF
Comparisons of web languages
PPTX
Lecture6 web design and development
Fundamental CSS3
Css3 Presetation
Creative Web 2 - CSS
Twitter bootstrap training_session_ppt
html & css
Html Styles-CSS
Lecture 1
Comparisons of web languages
Lecture6 web design and development
Ad

Similar to Managing CSS for a big ass website - at Netlog (20)

PPTX
Bootstrap 3
PDF
"Responsive Web Design: Clever Tips and Techniques". Vitaly Friedman, Smashin...
PDF
Pfnp slides
PDF
Exploring Critical Rendering Path
PDF
Vskills certified css designer Notes
PDF
A Complete Guide to Frontend - UI Developer
PPT
Responsive content
PPT
Introduction to BOOTSTRAP
PDF
Girl Develop It Cincinnati: Intro to HTML/CSS Class 4
KEY
Sass Essentials at Mobile Camp LA
PPTX
Building high performing web pages
PDF
Html css workshop, lesson 0, how browsers work
PPTX
Sitecore 10 XC SXA frontend development using the SXA Storefront Branded
DOCX
“Good design is obvious. Great design is transparent.” — How we use Bootstrap...
PPTX
Web technologies part-2
PPT
CSS Methodology
PDF
Death of a Themer
PPT
Bootstrap 3
"Responsive Web Design: Clever Tips and Techniques". Vitaly Friedman, Smashin...
Pfnp slides
Exploring Critical Rendering Path
Vskills certified css designer Notes
A Complete Guide to Frontend - UI Developer
Responsive content
Introduction to BOOTSTRAP
Girl Develop It Cincinnati: Intro to HTML/CSS Class 4
Sass Essentials at Mobile Camp LA
Building high performing web pages
Html css workshop, lesson 0, how browsers work
Sitecore 10 XC SXA frontend development using the SXA Storefront Branded
“Good design is obvious. Great design is transparent.” — How we use Bootstrap...
Web technologies part-2
CSS Methodology
Death of a Themer
Ad

More from Lennart Schoors (6)

PDF
Data, taste & confidence
PDF
Look ma! No images!
PDF
HTML5 data attributes
PDF
Web design for right-to-left languages
PDF
To Hell with Web Safe Fonts
PDF
Html 5 in a big nutshell
Data, taste & confidence
Look ma! No images!
HTML5 data attributes
Web design for right-to-left languages
To Hell with Web Safe Fonts
Html 5 in a big nutshell

Recently uploaded (20)

PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Zenith AI: Advanced Artificial Intelligence
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Univ-Connecticut-ChatGPT-Presentaion.pdf
PPTX
Chapter 5: Probability Theory and Statistics
PDF
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PDF
WOOl fibre morphology and structure.pdf for textiles
PDF
Encapsulation_ Review paper, used for researhc scholars
PPTX
SOPHOS-XG Firewall Administrator PPT.pptx
PDF
Hybrid model detection and classification of lung cancer
PDF
project resource management chapter-09.pdf
PDF
Heart disease approach using modified random forest and particle swarm optimi...
PPTX
TLE Review Electricity (Electricity).pptx
PPTX
cloud_computing_Infrastucture_as_cloud_p
PDF
NewMind AI Weekly Chronicles - August'25-Week II
PDF
DP Operators-handbook-extract for the Mautical Institute
PPTX
TechTalks-8-2019-Service-Management-ITIL-Refresh-ITIL-4-Framework-Supports-Ou...
MIND Revenue Release Quarter 2 2025 Press Release
Zenith AI: Advanced Artificial Intelligence
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Digital-Transformation-Roadmap-for-Companies.pptx
Univ-Connecticut-ChatGPT-Presentaion.pdf
Chapter 5: Probability Theory and Statistics
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Group 1 Presentation -Planning and Decision Making .pptx
WOOl fibre morphology and structure.pdf for textiles
Encapsulation_ Review paper, used for researhc scholars
SOPHOS-XG Firewall Administrator PPT.pptx
Hybrid model detection and classification of lung cancer
project resource management chapter-09.pdf
Heart disease approach using modified random forest and particle swarm optimi...
TLE Review Electricity (Electricity).pptx
cloud_computing_Infrastucture_as_cloud_p
NewMind AI Weekly Chronicles - August'25-Week II
DP Operators-handbook-extract for the Mautical Institute
TechTalks-8-2019-Service-Management-ITIL-Refresh-ITIL-4-Framework-Supports-Ou...

Managing CSS for a big ass website - at Netlog

  • 1. Managing CSS for a BIG ASS WEBSITE – at Netlog – Lennart Schoors
  • 2. Me . web designer at Netlog http://www.netlog.com . blog at http://lensco.be
  • 4. How big is big ass? . 100.000.000 visitors/month . 3.000.000.000 pageviews/month . more than 1.500 templates . lots of traffic & lots of different pages . 3 designers (vs. ~15 developers)
  • 5. Environment Staging Live . full, commented . minified . seperate files . concatenated . about 60 CSS files . about 40 CSS files . in SVN . 3-4 files/page max . served from CDN
  • 7. netlog.css . the engine . about 150kb . used sitewide on nearly every page
  • 8. netlog.css consists of (1/3) . netlog.core.css . css reset, typography (all of it), basic elements & headings, common classes like left, right, clearfix, clear, lists, … . netlog.common.css . "grid", boxes, building blocks & widgets, navigation, tabs, status messages, dialogs
  • 9. netlog.css consists of (2/3) . netlog.icons.css & netlog.ui.css . images sprites . use text clippings to expand “icon” to <img src="{top.__static}/s/i/common/blank.gif" class="icon icon " alt="" />
  • 11. bonus tip . hover & selected states for icon sprites <img src="{top.__static}/s/i/common/blank.gif" class="icon iconDelete iconOn" alt="" /> <img src="{top.__static}/s/i/common/blank.gif" class="icon iconDeleteAlt iconOff" alt="" />
  • 12. netlog.css consists of (3/3) . netlog.wrapper.css . header & footer styles . netlog.forms.css . buttons & inputs, form layouts, … . netlog.ads.css
  • 13. Other files . seperate file per “vertical” . seperate files for certain features . IE6 & IE7 styles via conditional comments . Right-to-left styles for RTL languages . mobile . external widgets
  • 14. Our code . lots of comments . headings & subheadings . indentation
  • 16. . emphasis on classes & combing them <a href="/foo" class="button buttonSmall buttonRed buttonCapitals inline">bar</a> . shift the load from always downloaded CSS to take-what-you-need HTML . “new pages don't need new css”
  • 17. Some call it ... “OOCSS” ... but CSS is not programming ;-)
  • 19. Deploy script . check diff . combines & minifies specified files . rsync to our servers . sync to CDN
  • 20. Dealing with cache . deploy bumps version number in config http://v.netlogstatic.com/v6.00/3077/s/c/netlog.css . now global, soon per file
  • 21. That’s all folks! Questions? Read on at http://lensco.be