├── .gitignore ├── LICENSE.md ├── README.md ├── i ├── combed.png └── csscomb.gif ├── keymaps └── css-comb.cson ├── lib ├── comb-task.js └── css-comb.js ├── menus └── css-comb.cson ├── package-lock.json ├── package.json └── styles └── css-comb.less /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | Copyright (c) 2014 Sergey Syrkin 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be 12 | included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ***This progect need mentor (if someone still needed it)*** 2 | 3 | # Csscomb package 4 | CSScomb is a coding style formatter for CSS (LESS|SASS|SCSS). 5 | 6 | Based on [csscombjs 3.0](https://github.com/csscomb/csscomb.js) 7 | 8 | ![Css Comb](https://raw.githubusercontent.com/jchouse/csscomb-atom/master/i/csscomb.gif) 9 | 10 | ## Configure 11 | Create you [own config](http://csscomb.com/config). 12 | Read about prep [configs](https://github.com/csscomb/csscomb.js/tree/master/config) 13 | 14 | ## How to use 15 | Open any file and press `ctrl+alt+c`, or use context menu. 16 | 17 | ## Contributors 18 | Haojia Che [1989car](https://github.com/1989car) 19 | Rasmus Bergström [af-bergstrom](https://github.com/af-bergstrom) 20 | -------------------------------------------------------------------------------- /i/combed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchouse/csscomb-atom/01dd747953b1cfa69c2a3bdcffe5d5ea3bb5bc52/i/combed.png -------------------------------------------------------------------------------- /i/csscomb.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchouse/csscomb-atom/01dd747953b1cfa69c2a3bdcffe5d5ea3bb5bc52/i/csscomb.gif -------------------------------------------------------------------------------- /keymaps/css-comb.cson: -------------------------------------------------------------------------------- 1 | # Keybindings require three things to be fully defined: A selector that is 2 | # matched against the focused element, the keystroke and the command to 3 | # execute. 4 | # 5 | # Below is a basic keybinding which registers on all platforms by applying to 6 | # the root workspace element. 7 | 8 | # For more detailed documentation see 9 | # https://atom.io/docs/latest/advanced/keymaps 10 | 'atom-text-editor': 11 | 'ctrl-alt-c': 'css-comb:comb' 12 | -------------------------------------------------------------------------------- /lib/comb-task.js: -------------------------------------------------------------------------------- 1 | const Comb = require('csscomb'); 2 | 3 | module.exports = function(config, syntax, text) { 4 | var comb = new Comb(config), 5 | callback; 6 | 7 | callback = this.async(); 8 | 9 | return comb.processString(text, {syntax: syntax}) 10 | .then(result => emit('comb-text-success', result)) 11 | .catch(error => emit('comb-text-error', error)); 12 | }; 13 | -------------------------------------------------------------------------------- /lib/css-comb.js: -------------------------------------------------------------------------------- 1 | 'use babel'; 2 | 3 | import {CompositeDisposable, Task} from 'atom'; 4 | import path from 'path'; 5 | 6 | export default { 7 | config: { 8 | projectConfigs: { 9 | title: 'Use project config', 10 | description: 'Relative to the project directory. Example: `.csscomb.json` or `configs/.csscomb.json`. Leave blank if you want to use the following setting', 11 | default: '', 12 | type: 'string' 13 | }, 14 | commonConfigs: { 15 | title: 'Use common config', 16 | description: 'Put here a full path to your config. Example: `/Users/jchouse/propjects/.csscomb.json`. Leave blank if you want to use the following setting', 17 | default: '', 18 | type: 'string' 19 | }, 20 | readyMadeConfigs: { 21 | title: 'Ready made configs', 22 | description: 'Used when you do not specify a project or common file. The details below.', 23 | type: 'string', 24 | default: 'yandex', 25 | enum: ['yandex', 'csscomb', 'zen'] 26 | }, 27 | runOnSave: { 28 | title: 'Run on save', 29 | description: 'Format your files everytime you save', 30 | default: false, 31 | type: 'boolean' 32 | } 33 | }, 34 | 35 | subscriptions: new CompositeDisposable(), 36 | 37 | getSettingsConfig() { 38 | var cssCombPackage = atom.packages.getLoadedPackage('atom-css-comb'), 39 | error, 40 | optionsFilePath, 41 | projectConfigs = atom.config.get('atom-css-comb.projectConfigs'), 42 | projectPath = atom.project.getPaths()[0], 43 | commonConfigs = atom.config.get('atom-css-comb.commonConfigs'), 44 | readyMadeConfigs = atom.config.get('atom-css-comb.readyMadeConfigs'); 45 | 46 | if (projectConfigs) { 47 | optionsFilePath = path.join(projectPath, projectConfigs); 48 | try { 49 | return require(optionsFilePath); 50 | } catch (error) { 51 | return error; 52 | } 53 | } else if (commonConfigs) { 54 | try { 55 | return require(commonConfigs); 56 | } catch (error) { 57 | return error; 58 | } 59 | } else { 60 | return readyMadeConfigs || 'yandex'; 61 | } 62 | }, 63 | 64 | activate() { 65 | this.subscriptions.add(atom.commands.add('atom-workspace', { 66 | 'css-comb:comb': () => this.comb() 67 | })); 68 | 69 | this.observeSave(); 70 | }, 71 | 72 | destroy() { 73 | this.subscriptions.dispose(); 74 | }, 75 | 76 | observeSave () { 77 | this.subscriptions.add(atom.workspace.observeTextEditors(editor => { 78 | this.subscriptions.add(editor.getBuffer().onWillSave(() => { 79 | const runOnSave = atom.config.get('atom-css-comb.runOnSave'), 80 | syntax = this._getSytax(), 81 | name = atom.workspace.getActiveTextEditor().getGrammar().name; 82 | 83 | if (!(syntax instanceof Error) && runOnSave && name !== 'HTML') { 84 | this.comb(); 85 | } 86 | })); 87 | })); 88 | }, 89 | 90 | _getSytax() { 91 | var syntax = atom.workspace.getActiveTextEditor().getGrammar().name.toLowerCase(); 92 | 93 | if (['css', 'less', 'sass', 'scss'].includes(syntax)) { 94 | return syntax; 95 | } else if (['html', 'postcss'].includes(syntax)) { 96 | return 'css'; 97 | } else { 98 | return new Error(); 99 | } 100 | }, 101 | 102 | _getSelectedText() { 103 | return atom.workspace.getActiveTextEditor().getSelectedText(); 104 | }, 105 | 106 | _getText() { 107 | return atom.workspace.getActiveTextEditor().getText(); 108 | }, 109 | 110 | comb() { 111 | var config = this.getSettingsConfig(), 112 | selectedText = this._getSelectedText(), 113 | syntax = this._getSytax(); 114 | 115 | if (config instanceof Error) { 116 | return atom.notifications.addError(config.message); 117 | } else if (syntax instanceof Error) { 118 | return atom.notifications.addError('Not supported syntax'); 119 | } else { 120 | const _name = atom.workspace.getActiveTextEditor().getGrammar().name, 121 | activePane = atom.workspace.getActivePaneItem(); 122 | 123 | if (!selectedText && syntax === 'css' && _name === 'HTML') { 124 | atom.notifications.addError('Please select the css for combing.'); 125 | return; 126 | } 127 | 128 | const task = Task.once(`${__dirname}/comb-task.js`, 129 | config, 130 | syntax, 131 | selectedText || this._getText(), 132 | () => console.log('csscomb: Comb done')); 133 | 134 | task.on('comb-text-success', 135 | result => { 136 | if (selectedText !== '') { 137 | activePane.setTextInBufferRange(activePane.getSelectedBufferRange(), result); 138 | } else { 139 | atom.workspace.getActivePaneItem().setText(result); 140 | } 141 | }); 142 | 143 | task.on('comb-text-error', 144 | error => atom.notifications.addError(error.stack)); 145 | } 146 | } 147 | }; 148 | -------------------------------------------------------------------------------- /menus/css-comb.cson: -------------------------------------------------------------------------------- 1 | # See https://atom.io/docs/latest/creating-a-package#menus for more details 2 | 'context-menu': 3 | 'atom-text-editor': [ 4 | { 'label' : 'Css Comb', 'command': 'css-comb:comb'} 5 | ] 6 | 7 | 'menu': [ 8 | { 9 | 'label': 'Packages' 10 | 'submenu': [ 11 | 'label': 'Css Comb' 12 | 'submenu': [ 13 | { 'label': 'Comb', 'command': 'css-comb:comb' } 14 | ] 15 | ] 16 | } 17 | ] 18 | -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "atom-css-comb", 3 | "version": "3.5.1", 4 | "lockfileVersion": 1, 5 | "requires": true, 6 | "dependencies": { 7 | "atom-space-pen-views": { 8 | "version": "2.0.3", 9 | "resolved": false, 10 | "integrity": "sha1-ExC9YkWddpSlk5/17DxisGC65Yc=", 11 | "requires": { 12 | "fuzzaldrin": "^2.1.0", 13 | "grim": "^1.0.0", 14 | "space-pen": "^5.0.1" 15 | } 16 | }, 17 | "babel-polyfill": { 18 | "version": "6.23.0", 19 | "resolved": "https://registry.npmjs.org/babel-polyfill/-/babel-polyfill-6.23.0.tgz", 20 | "integrity": "sha1-g2TKYt+Or7gwSZ9pkXdGbDsDSZ0=", 21 | "requires": { 22 | "babel-runtime": "^6.22.0", 23 | "core-js": "^2.4.0", 24 | "regenerator-runtime": "^0.10.0" 25 | } 26 | }, 27 | "babel-runtime": { 28 | "version": "6.23.0", 29 | "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.23.0.tgz", 30 | "integrity": "sha1-CpSJ8UTecO+zzkMArM2zKeL8VDs=", 31 | "requires": { 32 | "core-js": "^2.4.0", 33 | "regenerator-runtime": "^0.10.0" 34 | } 35 | }, 36 | "balanced-match": { 37 | "version": "1.0.0", 38 | "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", 39 | "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" 40 | }, 41 | "brace-expansion": { 42 | "version": "1.1.8", 43 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz", 44 | "integrity": "sha1-wHshHHyVLsH479Uad+8NHTmQopI=", 45 | "requires": { 46 | "balanced-match": "^1.0.0", 47 | "concat-map": "0.0.1" 48 | } 49 | }, 50 | "concat-map": { 51 | "version": "0.0.1", 52 | "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", 53 | "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" 54 | }, 55 | "core-js": { 56 | "version": "2.4.1", 57 | "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.4.1.tgz", 58 | "integrity": "sha1-TekR5mew6ukSTjQlS1OupvxhjT4=" 59 | }, 60 | "csscomb": { 61 | "version": "4.2.0", 62 | "resolved": "https://registry.npmjs.org/csscomb/-/csscomb-4.2.0.tgz", 63 | "integrity": "sha512-HXXCSVTpHck64PUMIn/2I8auBGmIpx+cD/Hs+KnYH+p9iaMTN0cd38l22qYVp8vEp6v9w+Bbi0SD8iN8fgrINg==", 64 | "requires": { 65 | "babel-polyfill": "6.23.0", 66 | "glob": "^7.1.3", 67 | "gonzales-pe": "^3.4.7", 68 | "minimatch": "3.0.2", 69 | "minimist": "1.1.x", 70 | "vow": "0.4.4", 71 | "vow-fs": "0.3.6" 72 | }, 73 | "dependencies": { 74 | "gonzales-pe": { 75 | "version": "3.4.7", 76 | "resolved": "https://registry.npmjs.org/gonzales-pe/-/gonzales-pe-3.4.7.tgz", 77 | "integrity": "sha1-F8e+Z61sr/Ynej44esc26YPSgOw=", 78 | "requires": { 79 | "minimist": "1.1.x" 80 | } 81 | }, 82 | "minimatch": { 83 | "version": "3.0.2", 84 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.2.tgz", 85 | "integrity": "sha1-DzmKcwDqRB6cNIyD2Yq4ydv5xAo=", 86 | "requires": { 87 | "brace-expansion": "^1.0.0" 88 | } 89 | }, 90 | "vow-fs": { 91 | "version": "0.3.6", 92 | "resolved": "https://registry.npmjs.org/vow-fs/-/vow-fs-0.3.6.tgz", 93 | "integrity": "sha1-LUxZviLivyYY3fWXq0uqkjvnIA0=", 94 | "requires": { 95 | "glob": "^7.0.5", 96 | "uuid": "^2.0.2", 97 | "vow": "^0.4.7", 98 | "vow-queue": "^0.4.1" 99 | }, 100 | "dependencies": { 101 | "vow": { 102 | "version": "0.4.16", 103 | "resolved": "https://registry.npmjs.org/vow/-/vow-0.4.16.tgz", 104 | "integrity": "sha1-u51U2TjV+AUg1linQOeoleMP7us=" 105 | } 106 | } 107 | }, 108 | "vow-queue": { 109 | "version": "0.4.2", 110 | "resolved": "https://registry.npmjs.org/vow-queue/-/vow-queue-0.4.2.tgz", 111 | "integrity": "sha1-5/4XFg4Vx8QYTRtmapvGThjjAYQ=", 112 | "requires": { 113 | "vow": "~0.4.0" 114 | } 115 | } 116 | } 117 | }, 118 | "d": { 119 | "version": "0.1.1", 120 | "resolved": false, 121 | "integrity": "sha1-2hhMU10Y2O57oqoim5FACfrhEwk=", 122 | "requires": { 123 | "es5-ext": "~0.10.2" 124 | } 125 | }, 126 | "emissary": { 127 | "version": "1.3.3", 128 | "resolved": false, 129 | "integrity": "sha1-phjZLWgrIy0xER3DYlpd9mF5lgY=", 130 | "requires": { 131 | "es6-weak-map": "^0.1.2", 132 | "mixto": "1.x", 133 | "property-accessors": "^1.1", 134 | "underscore-plus": "1.x" 135 | } 136 | }, 137 | "es5-ext": { 138 | "version": "0.10.12", 139 | "resolved": false, 140 | "integrity": "sha1-qoRkHU23a2Krul5F/YBey6sUAEc=", 141 | "requires": { 142 | "es6-iterator": "2", 143 | "es6-symbol": "~3.1" 144 | }, 145 | "dependencies": { 146 | "es6-iterator": { 147 | "version": "2.0.0", 148 | "resolved": false, 149 | "integrity": "sha1-vZaFZ9YWNeM8C4BydhPJy0sJa6w=", 150 | "requires": { 151 | "d": "^0.1.1", 152 | "es5-ext": "^0.10.7", 153 | "es6-symbol": "3" 154 | } 155 | }, 156 | "es6-symbol": { 157 | "version": "3.1.0", 158 | "resolved": false, 159 | "integrity": "sha1-lEgcZV56fK2C66gy2X1UM0ltf/o=", 160 | "requires": { 161 | "d": "~0.1.1", 162 | "es5-ext": "~0.10.11" 163 | } 164 | } 165 | } 166 | }, 167 | "es6-iterator": { 168 | "version": "0.1.3", 169 | "resolved": false, 170 | "integrity": "sha1-1vWLjE/EE8JJtLqhl2j45NfIlE4=", 171 | "requires": { 172 | "d": "~0.1.1", 173 | "es5-ext": "~0.10.5", 174 | "es6-symbol": "~2.0.1" 175 | } 176 | }, 177 | "es6-symbol": { 178 | "version": "2.0.1", 179 | "resolved": false, 180 | "integrity": "sha1-dhtcZ8/U8dGK+yNPaR1nhoLLO/M=", 181 | "requires": { 182 | "d": "~0.1.1", 183 | "es5-ext": "~0.10.5" 184 | } 185 | }, 186 | "es6-weak-map": { 187 | "version": "0.1.4", 188 | "resolved": false, 189 | "integrity": "sha1-cGzvnpmqI2undmwjnIueKG6n0ig=", 190 | "requires": { 191 | "d": "~0.1.1", 192 | "es5-ext": "~0.10.6", 193 | "es6-iterator": "~0.1.3", 194 | "es6-symbol": "~2.0.1" 195 | } 196 | }, 197 | "fs.realpath": { 198 | "version": "1.0.0", 199 | "resolved": "https://artifactory.nordstrom.com/artifactory/api/npm/npm/fs.realpath/-/fs.realpath-1.0.0.tgz", 200 | "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" 201 | }, 202 | "fuzzaldrin": { 203 | "version": "2.1.0", 204 | "resolved": false, 205 | "integrity": "sha1-kCBMPi/appQbso0WZF1BgGOpDps=" 206 | }, 207 | "glob": { 208 | "version": "7.1.3", 209 | "resolved": "https://artifactory.nordstrom.com/artifactory/api/npm/npm/glob/-/glob-7.1.3.tgz", 210 | "integrity": "sha1-OWCDLT8VdBCDQtr9OmezMsCWnfE=", 211 | "requires": { 212 | "fs.realpath": "^1.0.0", 213 | "inflight": "^1.0.4", 214 | "inherits": "2", 215 | "minimatch": "^3.0.4", 216 | "once": "^1.3.0", 217 | "path-is-absolute": "^1.0.0" 218 | } 219 | }, 220 | "grim": { 221 | "version": "1.5.0", 222 | "resolved": false, 223 | "integrity": "sha1-sysI71Z88YUvgXWe2caLDXE5ajI=", 224 | "requires": { 225 | "emissary": "^1.2.0" 226 | } 227 | }, 228 | "inflight": { 229 | "version": "1.0.6", 230 | "resolved": "https://artifactory.nordstrom.com/artifactory/api/npm/npm/inflight/-/inflight-1.0.6.tgz", 231 | "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", 232 | "requires": { 233 | "once": "^1.3.0", 234 | "wrappy": "1" 235 | } 236 | }, 237 | "inherits": { 238 | "version": "2.0.3", 239 | "resolved": "https://artifactory.nordstrom.com/artifactory/api/npm/npm/inherits/-/inherits-2.0.3.tgz", 240 | "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" 241 | }, 242 | "jquery": { 243 | "version": "2.1.4", 244 | "resolved": false, 245 | "integrity": "sha1-IoveaYoMYUMdwmMKahVPFYkNIxc=" 246 | }, 247 | "minimatch": { 248 | "version": "3.0.4", 249 | "resolved": "https://artifactory.nordstrom.com/artifactory/api/npm/npm/minimatch/-/minimatch-3.0.4.tgz", 250 | "integrity": "sha1-UWbihkV/AzBgZL5Ul+jbsMPTIIM=", 251 | "requires": { 252 | "brace-expansion": "^1.1.7" 253 | } 254 | }, 255 | "minimist": { 256 | "version": "1.1.3", 257 | "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.1.3.tgz", 258 | "integrity": "sha1-O+39kaktOQFvz6ocaB6Pqhoe/ag=" 259 | }, 260 | "mixto": { 261 | "version": "1.0.0", 262 | "resolved": false, 263 | "integrity": "sha1-wyDvYbUvKJj1IuF9i7xtUG2EJbY=" 264 | }, 265 | "once": { 266 | "version": "1.4.0", 267 | "resolved": "https://artifactory.nordstrom.com/artifactory/api/npm/npm/once/-/once-1.4.0.tgz", 268 | "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", 269 | "requires": { 270 | "wrappy": "1" 271 | } 272 | }, 273 | "path-is-absolute": { 274 | "version": "1.0.1", 275 | "resolved": "https://artifactory.nordstrom.com/artifactory/api/npm/npm/path-is-absolute/-/path-is-absolute-1.0.1.tgz", 276 | "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" 277 | }, 278 | "property-accessors": { 279 | "version": "1.1.3", 280 | "resolved": false, 281 | "integrity": "sha1-Hd6EAkYxhlkJ7zBwM2VoDF+SixU=", 282 | "requires": { 283 | "es6-weak-map": "^0.1.2", 284 | "mixto": "1.x" 285 | } 286 | }, 287 | "regenerator-runtime": { 288 | "version": "0.10.5", 289 | "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.10.5.tgz", 290 | "integrity": "sha1-M2w+/BIgrc7dosn6tntaeVWjNlg=" 291 | }, 292 | "space-pen": { 293 | "version": "5.1.2", 294 | "resolved": false, 295 | "integrity": "sha1-Ivu+EOCwROe3pHsCPamdlLWE748=", 296 | "requires": { 297 | "grim": "^1.0.0", 298 | "jquery": "2.1.4", 299 | "underscore-plus": "1.x" 300 | } 301 | }, 302 | "underscore": { 303 | "version": "1.6.0", 304 | "resolved": false, 305 | "integrity": "sha1-izixDKze9jM3uLJOT/htRa6lKag=" 306 | }, 307 | "underscore-plus": { 308 | "version": "1.6.6", 309 | "resolved": false, 310 | "integrity": "sha1-ZezeG9xEGjXYnmUP1w3PE65Dmn0=", 311 | "requires": { 312 | "underscore": "~1.6.0" 313 | } 314 | }, 315 | "uuid": { 316 | "version": "2.0.3", 317 | "resolved": "https://registry.npmjs.org/uuid/-/uuid-2.0.3.tgz", 318 | "integrity": "sha1-Z+LoY3lyFVMN/zGOW/nc6/1Hsho=" 319 | }, 320 | "vow": { 321 | "version": "0.4.4", 322 | "resolved": false, 323 | "integrity": "sha1-yf5GCRKdf1qmIVCOvmS1HJW8e5g=" 324 | }, 325 | "wrappy": { 326 | "version": "1.0.2", 327 | "resolved": "https://artifactory.nordstrom.com/artifactory/api/npm/npm/wrappy/-/wrappy-1.0.2.tgz", 328 | "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" 329 | } 330 | } 331 | } 332 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "atom-css-comb", 3 | "main": "./lib/css-comb", 4 | "version": "3.5.1", 5 | "description": "CSScomb is a coding style formatter for CSS (LESS|SASS|SCSS). You can easily write your own configuration to make your style sheets beautiful and consistent.", 6 | "repository": { 7 | "type": "git", 8 | "url": "https://github.com/jchouse/csscomb-atom" 9 | }, 10 | "license": "MIT", 11 | "engines": { 12 | "atom": ">=1.18.0 <2.0.0" 13 | }, 14 | "dependencies": { 15 | "atom-space-pen-views": "2.0.3", 16 | "csscomb": "4.2.0" 17 | }, 18 | "devDependencies": {}, 19 | "bugs": { 20 | "url": "https://github.com/jchouse/csscomb-atom/issues" 21 | }, 22 | "homepage": "https://github.com/jchouse/csscomb-atom" 23 | } 24 | -------------------------------------------------------------------------------- /styles/css-comb.less: -------------------------------------------------------------------------------- 1 | // The ui-variables file is provided by base themes provided by Atom. 2 | // 3 | // See https://github.com/atom/atom-dark-ui/blob/master/stylesheets/ui-variables.less 4 | // for a full listing of what's available. 5 | @import "ui-variables"; 6 | 7 | .css-comb { 8 | input[type="radio"] { 9 | margin-right: 10px; 10 | } 11 | 12 | &__block { 13 | margin-bottom: 10px; 14 | padding: 5px 20px; 15 | 16 | border: 1px solid rgba(200,200,200, 0.1); 17 | } 18 | 19 | &__block:last-child { 20 | margin-bottom: 0; 21 | } 22 | 23 | .css-comb-config { 24 | margin-left: 20px; 25 | } 26 | 27 | &__row { 28 | &_aright { 29 | text-align: right; 30 | } 31 | } 32 | } 33 | --------------------------------------------------------------------------------