csstools / postcss-short

Use advanced shorthand properties in CSS
https://jonathantneal.github.io/postcss-short
Creative Commons Zero v1.0 Universal
189 stars 7 forks source link

Removes !important flag #22

Open gavinmcfarland opened 4 years ago

gavinmcfarland commented 4 years ago

Hi, I noticed this by accident, but postcss-short I believe is not accounting for the CSS !important flag.

I noticed this with font-size.

For example:

p {
  font-size: inherit !important;
}

Results in:

p {
  font-size: inherit;

I'm not sure if other properties have the same issue, I can check when I get a chance.

bluishoul commented 3 years ago

@limitlessloop https://github.com/csstools/postcss-short-font-size/blob/master/test/basic.css#L6 and https://github.com/csstools/postcss-short-font-size/blob/master/test/basic.expect.css#L6 explain everything