cssparser
Advanced tools
Comparing version 0.9.2 to 0.9.3
@@ -16,3 +16,3 @@ { | ||
], | ||
"version": "0.9.2", | ||
"version": "0.9.3", | ||
"preferGlobal": true, | ||
@@ -19,0 +19,0 @@ "repository": { |
@@ -403,2 +403,5 @@ ![Travis Build Status - Master](https://img.shields.io/travis/cwdoh/cssparser.js/master.svg) | ||
* 0.9.3 - July 20th, 2017 | ||
* Fixed producing undefined for expression when using simple mode. | ||
* Supported IE hacks including `_PROPERTY` pattern. | ||
* 0.9.2 - March 17th, 2017 | ||
@@ -405,0 +408,0 @@ * Now supports beautify delimiter option for simple & deep type. |
@@ -28,7 +28,18 @@ class QualifiedRule extends CSSObject { | ||
var value = toSimple(this.get('value')) | ||
if (this.get('backslashHack', false)) { | ||
value += '\\9' | ||
} | ||
if (this.get('important', false)) { | ||
value += ' !important' | ||
} | ||
json[toSimple(this.get('property'))] = value | ||
var property = toSimple(this.get('property')) | ||
if (this.get('asteriskHack', false)) { | ||
property = '*' + property | ||
} | ||
if (this.get('underscoreHack', false)) { | ||
property = '_' + property | ||
} | ||
json[property] = value | ||
return json | ||
@@ -35,0 +46,0 @@ } |
@@ -162,7 +162,8 @@ class CSSObject { | ||
toSimpleJSON() { | ||
return | ||
toSimple(this.get('lhs')) | ||
// for beautify | ||
+ ' ' + toSimple(this.get('operator')) + ' ' | ||
+ toSimple(this.get('rhs')) | ||
var lhs = toSimple(this.get('lhs')) | ||
var operator = toSimple(this.get('operator')) | ||
var rhs = toSimple(this.get('rhs')) | ||
// for beautifying, added some spaces bewteen nodes | ||
return lhs + ' ' + operator + ' ' + rhs | ||
} | ||
@@ -169,0 +170,0 @@ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
425
4
965206
43
6160