Home Download Buy Blog Forum Support

Align/columnize CSS rules?

Align/columnize CSS rules?

Postby handycam on Thu Jan 17, 2013 9:30 pm

I was looking for a plugin to do this with a CSS selection:

Code: Select all
.scroller-content               { float: left; padding-top: 15px; width: 250px; height: 240px; }
.scroller-content ul            { float: left; margin: 0; padding: 0; list-style-type: none; }
.scroller-content li            { float: left; padding: 0 10px; width: 104px; height: 240px; }
.scroller-content li a          { display: block; margin: 4px 0; color: #686155; text-decoration: none; font-weight: bold; font-size: 11px; }
.scroller-content li a:hover    { text-decoration: underline }
.scroller-content .sale         { color: #bc1a2d }


The "Alignment" plugin doesn't seem to do it, at least not out-of-the-box. I did the above using a separate app called ProCSSor on Mac.

Any ideas?
Mac OS 10.8.5
ST 3 (3053)
handycam
 
Posts: 269
Joined: Tue Jan 03, 2012 2:42 pm

Re: Align/columnize CSS rules?

Postby vitaLee on Fri Jan 18, 2013 9:11 am

Haven't looked much into it, but you might want to check this plugin https://github.com/randy3k/AlignTab
vitaLee
 
Posts: 150
Joined: Tue Dec 27, 2011 11:10 pm

Re: Align/columnize CSS rules?

Postby wbond on Fri Jan 18, 2013 3:23 pm

If all of your CSS rules are single line, you could change the alignment chars for CSS to "{" by copying https://github.com/wbond/sublime_alignm ... e-settings into your Packages/User/ folder and customizing to your liking.

If only sometimes you have single-line CSS rules:

  1. Select the first {
  2. Press ctrl+d until all opening { are selected
  3. Press ctrl+alt+a to align them
wbond
 
Posts: 493
Joined: Mon Feb 28, 2011 5:33 am


Return to General Discussion

Who is online

Users browsing this forum: alexandernst and 16 guests

cron