csscomb / csscomb.js

CSS coding style formatter
http://csscomb.com/
MIT License
3.28k stars 459 forks source link

Fix bug in getSortablePropertyName for parse CSS custom properties (variables), #537 #595

Closed avdieiev closed 5 years ago

avdieiev commented 5 years ago

According to #537. This PR also includes https://github.com/csscomb/csscomb.js/pull/566 Fixed - "TypeError: Cannot read property 'first' of null in _getSortablePropertyName"

Now CSS custom properties are parsed correctly

mariovalney commented 5 years ago

Hi, @avdieiev ! Thanks for this.

Would you can refresh this PR?

jdalton commented 5 years ago

Merged as https://github.com/csscomb/csscomb.js/commit/901a6ffc894fe623f4799dca7629e57e8a7b5890, https://github.com/csscomb/csscomb.js/commit/fe9c6725362fb9bef2782aca0ac9c835f35baeba, and https://github.com/csscomb/csscomb.js/commit/cbd6815e9cdd38266f3f0ac518c9458d7cade117

Taranovskiy commented 1 year ago

Hi, guys! Please tell me why this code never got into the master branch? I use the latest version (4.3.0) in my project and have problems with using CSS custom properties and I don't find the fixes from this PR in in my node_modules/csscomb/lib/options/sort-order.js. Here is the error stack trace:

var property = node.first('property').first();
                                           ^
TypeError: Cannot read properties of null (reading 'first')