Project

csswaxer

0.0
No commit activity in last 3 years
No release in over 3 years
CSS Waxer refactors CSS files bringing the focus on properties, rather than on selectors. Typically, CSS files are written by groups of selectors, you first specify all the properties of <body>, then those of <h1>, #header, and so on. This makes it hard to catch a glimpse of the overall style of a site, such as the entire list of colors used, the fonts, or the dimensions. CSS Waxer reorders the lines of a CSS files so that properties are grouped together by family. In this way, you can rapidly check together all the fonts used, the colors, backgrounds, layouts and so on for the whole site.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

>= 1.3.5
>= 1.0.4
 Project Readme

CssWaxer

Ruby command-line tool that prettifies CSS files grouping lines by property rather than by selector

Installation (from GemCutter)

sudo gem update --system  # in order to install dependencies
gem install csswaxer

Examples

csswaxer http://rubygems.org/stylesheets/all.css
csswaxer http://vlex.com/stylesheets/new.css

To do

  • Add a proper wiki
  • Accept CSS files with commands split on multiple lines
  • Accept different media types, not only screen
  • Contain every possible CSS property
  • Align TABS for each property
  • Also expand shorthand property list-style (css_parser does not)
  • Recreate shorthand formats in the final output

Other styles of CSS Code Readability

Loud Dog

Smashing Magazine

History

v0.0.9 2014/06/05 Bump CSS Parser, which is now available as a gem again. Include iconv which is required.

v0.0.8 2010/08/03 CSS Parser is no (longer) available as a gem in version 1.1.0. Fixed by creating a new gem called css_parser_1.1.0 and requiring that one instead

v0.0.7 2010/04/03 Expanded shorthand properties: background, font, margin, padding

v0.0.6 2010/04/02 Requires CSS Parser > 1.1.0 which includes load_file!

v0.0.5 2010/04/02 Fixed a bug; now respects multiple property values for the same selector

v0.0.4 2010/03/31 Fixed a bug; now also respects !important statements

v0.0.3 2010/03/28 Fixed a bug; now also works on remote CSS files

v0.0.1 2010/03/28 First commit that only works on CSS files with one-line style.

License

Released in the public domain under the Ruby license. See LICENSE for details.