The dangerous task of refactoring 5,000 lines of CSS. Any tips?

I was just assigned the task of refactoring a huge 5000-line CSS file ... but here's the worst part - I also need to make it compatible with IE6. Do all CSS gurus have tool suggestions or maybe tips (common traps) to use on my monolithic expedition? Greetings.

+5
source share
14 answers

checkout sass ... includes the ability to convert css to sass. http://haml.hamptoncatlin.com/docs/rdoc/classes/Sass.html

Sass file is a yaml file that can be parsed into a css file. It allows you to use variables and an alternative organization ...

Sass example:

  !main_color = #00ff00

  #main
    :color = !main_color
    :p
      :background-color = !main_color
      :color #000000

css output:

  #main {
    color: #00ff00; }
    #main p {
      background-color: #00ff00;
      color: #000000; }
+12

:

  • , .
  • . URL- , , , ( " ", ).
  • CSS-, , , ..
  • , - SASS, "" CSS, .
  • , , , IE6 .
  • , , IE6, , , Microsoft .
  • W3C Validation.
:
<link type="text/css" href="newhotness.css" />
<link type="text/css" href="newhotness-ie6.css" />
<link type="text/css" href="oldandbusted.css" />

() , , . , , , , Ctrl-Tab , ..

( CSS , @import .)

+10

!

, , . IE6, , , , CSS-, .

5000 2000 , CSS. , CSS 2k CSS, 5k CSS.

+9

CSS, : GIT.

  • git;
  • , ;
  • , , - - , , git bisect ( );

CSS, .

+1

, . , :

+1

: (, Selenium?), , - ImageMagick .

, . , -, , , , , . Git .

+1

. , goodluck .

0

, CSS NCover, , CSS . Google CSS : , : http://development.lombardi.com/?p=436

0

sass, css2sass 5000 css, . sass , sass2css, css. !

0

Stylizer - CSS . CSS , ..

0

, , , , . . , . . , . . , , .

. , "", HTML/CSS.

, . .

, CSS , , CSS reset. , #id , , , , , , . , , .

0

Firefox Plugin . CSS.

0

: ReSharper JetBrains. CSS CSS.

-1

All Articles