3 tips for modernising CSS
Readers of net magazine share their advice on the tricky topic of modernising legacy CSS.
From factoring in responsive web design to keeping up with the latest developments in CSS3 animation, bringing an old site into the modern era can be tricky. So to help developers find their way through, net magazine asked their Twitter followers how they get CSS up to date.
01. Review and rearrange
@netmag review code, and (slowly but surely) move snippets into smaller partials to be able to improve at later date. Test, test, test! 1/2February 18, 2016
@netmag Take inventory first. You can't throw out garbage until you know what you have.February 18, 2016
@netmag 2/2 moving CSS around can have adverse effects so be v. careful with any changes - even just reorderingFebruary 18, 2016
02. Take it slow
@netmag Painfully.February 18, 2016
@netmag Next, reconsider every code construct and mercilessly kill every one that doesn’t need to be there.February 18, 2016
@netmag Copy paste from .CSS to .SCSS and slowly modularise.February 18, 2016
@netmag Sass it up and give it a good SMACSS treatmentFebruary 16, 2016
03. Just don't
@netmag Retire legacy code and rewrite!February 17, 2016
@netmag With a big stick, a burlap sack, a bonfire and a cup of tea.February 16, 2016
@netmag delete delete delete delete delete delete delete delete delete delete delete delete delete delete delete delete delete. start again.February 17, 2016
This article was originally published in net magazine issue 279, page 17.
Thank you for reading 5 articles this month* Join now for unlimited access
Enjoy your first month for just £1 / $1 / €1
*Read 5 free articles per month without a subscription
Join now for unlimited access
Try first month for just £1 / $1 / €1
Get top Black Friday deals sent straight to your inbox: Sign up now!
We curate the best offers on creative kit and give our expert recommendations to save you time this Black Friday. Upgrade your setup for less with Creative Bloq.
Alice Pattillo is a freelance journalist with a passion for heavy metal, horror, science fiction, fantasy and comics. She has over seven years experience in magazines, formerly working as a staff writer at Creative Bloq, Imagine FX, Computer Arts and 3D World, as production editor for Guitar World and Guitar Player and online editor of Metal Hammer.