diff --git a/test/fixtures/important.css b/test/fixtures/important.css new file mode 100644 index 0000000..19b79f6 --- /dev/null +++ b/test/fixtures/important.css @@ -0,0 +1,4 @@ +.foo { + border: 1px solid rgba(#f00, 0.2) !important; + color: rgba(#f00,.2) !important; +} diff --git a/test/fixtures/important.expected.css b/test/fixtures/important.expected.css new file mode 100644 index 0000000..956990f --- /dev/null +++ b/test/fixtures/important.expected.css @@ -0,0 +1,4 @@ +.foo { + border: 1px solid rgba(255,0,0, 0.2) !important; + color: rgba(255,0,0,.2) !important; +} diff --git a/test/test.js b/test/test.js index 0a7479e..ad54cd2 100644 --- a/test/test.js +++ b/test/test.js @@ -32,4 +32,6 @@ describe('postcss-hexrgba', () => { it('handles complex statements', done => test('complex', {}, done)); + it('preservers !important', done => test('important', {}, done)); + });