Skip to content

CarlosOnline/Css2LessAgain

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Css2LessAgain

Convert css to less with variable names based on selectors.
WebSite: http://www.joyofplaying.com/Css2Less/

This version creates varable names from the css selectors:

  1. Uses your selectors for variables names
  2. Allows you to specify which selectors to turn into variables
  3. Fixes bug processing multi-line comments

Before

.ui-widget { font-family: Verdana,Arial,sans-serif/{ffDefault}/; font-size: 1.1em/{fsDefault}/; } .ui-widget .ui-widget { font-size: 1em; }

After

@ui-widget-font-size: 1.1em; @ui-widget-ui-combined-widget-font-size: 1em;

.ui-widget { font-family:Verdana,Arial,sans-serif; font-size:@ui-widget-font-size;

.ui-widget { font-size:@ui-widget-ui-combined-widget-font-size; } }

This is an enhanced version of the code from http://www.miyconst.com/Blog/View/14/Conver_css_to_less_with_css2less_js

About

Update to Css2Less to preserve variable names

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published