Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Regression: border: 0px somestyle somecolor is transformed into border: 0 #203

Closed
RReverser opened this issue May 24, 2018 · 0 comments
Closed

Comments

@RReverser
Copy link
Contributor

Ironically, CSS refactor PR (#177) that fixed one border issue fixing one border related issue (#176) seems to have created another obscure border issue.

Now CSS that looks like

.x {
  border: 0px dashed red;
}

is minified into

.x{border:0}

This transformation is incorrect as it doesn't take into account whether other values being removed actually correspond to their defaults from the spec. In some cases this results in break of cascading behaviour when such stylesheet is combined with another:

.x {
  border-width: 1px;
}

Previously, combination of these would result in equivalent of border: 1px dashed red, but after minification border-style remains none and border doesn't appear.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant