Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Improve longhand into multiple shorthand merging #527

Closed
jakubpawlowicz opened this issue Apr 13, 2015 · 1 comment
Closed

Improve longhand into multiple shorthand merging #527

jakubpawlowicz opened this issue Apr 13, 2015 · 1 comment
Milestone

Comments

@jakubpawlowicz
Copy link
Collaborator

E.g (shorter value).

p{background:-webkit-linear-gradient();background:linear-gradient();background-repeat:repeat-x} ->
p{background:-webkit-linear-gradient()repeat-x;background:linear-gradient()repeat-x}

or (default value)

p{background:-webkit-linear-gradient();background:linear-gradient();background-repeat:repeat} ->
p{background:-webkit-linear-gradient();background:linear-gradient()}

jakubpawlowicz added a commit that referenced this issue Apr 13, 2015
This disables such merges altogether as it is not an easy feat, since:

* Merged property may be default;
* Merged property can be merged into many shorthands resulting in
  longer value;
* There can be more properties waiting to be merged in.

Follow up in #527.
@jakubpawlowicz jakubpawlowicz added this to the 4.1 milestone Jan 4, 2017
@jakubpawlowicz
Copy link
Collaborator Author

these proposed transformations may be invalid due to style cascading, e.g.

.block-1 {
  background:url(image.png) repeat-y;
}
/* ... somewhere further down */
.block-2 {
  background:-webkit-linear-gradient();
  background:linear-gradient();
  background-repeat:repeat-x; /* <- trying to merge this into two properties above */
}

where merging in repeat-x would not override repeat-y from .block-1 declaration anymore - I recommend we leave it as is to avoid potential issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant