Skip to content

Improve @import and @media

Choose a tag to compare

@ianbogda ianbogda released this 27 Jan 12:32
· 18 commits to master since this release

New features:

  • remove unreachable @import files
  • transform @import url media to @media type {rules}

Existing features:

  • Remove white space and extra characters
  • * whitespace
  • *Last semicolon in a statement
  • *Measurement units for the values (eg margin: 0px -> margin: 0)
  • Comments (preserving /! important comments */)
  • *Empty statements (eg p {})
    Use shorthand properties
  • *margin
  • *padding
  • *border
  • *outline
  • *list-style
  • *background (eg instead of background-color)
  • Compress colors
  • *Use short notations of hexadecimal colors (Ex: color: # ff6600 becomes color: # f60;). Use colors supported in CSS 2 whose name is shorter than the hexadecimal.
  • Sorting CSS properties
  • Merge properties
  • merge rules if required
  • @import CSS
  • @media queries CSS