CSS Auto Commenting
Sublime plugin for auto commenting of CSS
Details
Installs
- Total 3K
- Win 2K
- Mac 624
- Linux 224
Feb 5 | Feb 4 | Feb 3 | Feb 2 | Feb 1 | Jan 31 | Jan 30 | Jan 29 | Jan 28 | Jan 27 | Jan 26 | Jan 25 | Jan 24 | Jan 23 | Jan 22 | Jan 21 | Jan 20 | Jan 19 | Jan 18 | Jan 17 | Jan 16 | Jan 15 | Jan 14 | Jan 13 | Jan 12 | Jan 11 | Jan 10 | Jan 9 | Jan 8 | Jan 7 | Jan 6 | Jan 5 | Jan 4 | Jan 3 | Jan 2 | Jan 1 | Dec 31 | Dec 30 | Dec 29 | Dec 28 | Dec 27 | Dec 26 | Dec 25 | Dec 24 | Dec 23 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Mac | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Linux | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Readme
- Source
- raw.githubusercontent.com
Sublime Automatic CSS comments
Using automatic styleguide generation like DSS or KSS is all well and good, but typing those comments is a pain!
This sublime plugin will try and figure out all that stuff for you and comment whatever CSS blocks you want.
How?
Just type///
followed by tab directly above the CSS section you want commenting and boom! Done.It will also check the rest of your CSS/SCSS/LESS file for related states or attributes and add them as states in the comments too, plus it will give a guess at a suggested markup.
Install
Package Manager
Press Ctrl + Shift + P (Cmd + Shift + P on OSX) and search “install”Then Search for ‘CSS Auto Commenting’ in the Sublime package manager and select it
Manual
Just download this repositry and dump the folder in the Sublime Packages folderExample
Say you have some masterful CSS like this
button{
background: #006dcc;
font-size: 18px;
color: #eee;
border: 1px solid rgba(0,0,0,0.5);
border-radius: 3px;
padding: 10px;
box-shadow: -3px -21px 21px -9px rgba(0,0,0,0.4) inset;
}
button.active{
background: maroon;
}
button:disabled{
background: #aaa;
color: #777;
}
Just do this
///[tab]
button{
background: #006dcc;
font-size: 18px;
color: #eee;
border: 1px solid rgba(0,0,0,0.5);
border-radius: 3px;
padding: 10px;
box-shadow: -3px -21px 21px -9px rgba(0,0,0,0.4) inset;
}
button.active{
background: maroon;
}
button:disabled{
background: #aaa;
color: #777;
}
And magically!
/**
* @name Button
* @description Style for the button element
* @state .active - active state
* @state :disabled - disabled state
* @markup
* <button>markup</button>
*/
button{
background: #006dcc;
font-size: 18px;
color: #eee;
border: 1px solid rgba(0,0,0,0.5);
border-radius: 3px;
padding: 10px;
box-shadow: -3px -21px 21px -9px rgba(0,0,0,0.4) inset;
}
button.active{
background: maroon;
}
button:disabled{
background: #aaa;
color: #777;
}
Woo!
Now you can spend less time commenting your stylesheets and more time… writing your stylesheets.
It will also work with nested SCSS/LESS structures
/**
* @name Button
* @description Style for the button element
* @state .active - active state
* @state :disabled - disabled state
* @markup
* <button>Markup</button>
*/
button{
background: #006dcc;
font-size: 18px;
color: #eee;
border: 1px solid rgba(0,0,0,0.5);
border-radius: 3px;
padding: 10px;
box-shadow: -3px -21px 21px -9px rgba(0,0,0,0.4) inset;
&.active{
background: maroon;
}
&:disabled{
background: #aaa;
color: #777;
}
}
And then run your DSS builder and out pops some pretty, effortless styleguides!
e.g.