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

vulcanize 1.x - reverses inlined style order inside dom-module #1987

Closed
usergenic opened this issue Jul 6, 2017 · 2 comments
Closed

vulcanize 1.x - reverses inlined style order inside dom-module #1987

usergenic opened this issue Jul 6, 2017 · 2 comments

Comments

@usergenic
Copy link
Contributor

The styles are prepended, but when there's more than one, that effectively reverses their sequence.
https://github.com/Polymer/polymer-bundler/blob/1.x/lib/vulcan.js#L404

Possibly as simple as reversing the order this collection is iterated over: https://github.com/Polymer/polymer-bundler/blob/1.x/lib/vulcan.js#L369

This effects users stuck on vulcanize 1.x only

@usergenic usergenic self-assigned this Jul 6, 2017
dfreedm referenced this issue in Polymer/polymer-bundler Jul 7, 2017
Previously, `<link rel="import" type="css">` styles were inlined by
prepending to the top of the `<dom-module>` template.

However, if there were multiple imports, the order would be reversed,
which can cause incorrect styling when overriding.

This commit makes sure the order remains correct for multiple style
imports.

Fixes #575
@dfreedm dfreedm assigned dfreedm and unassigned usergenic Jul 7, 2017
@dfreedm
Copy link
Member

dfreedm commented Jul 7, 2017

@usergenic It looks like _moveDomModuleStyleIntoTemplate in master has the same logic bug.

dfreedm referenced this issue in Polymer/polymer-bundler Jul 7, 2017
usergenic referenced this issue in Polymer/polymer-bundler Jul 7, 2017
Previously, `<link rel="import" type="css">` styles were inlined by
prepending to the top of the `<dom-module>` template.

However, if there were multiple imports, the order would be reversed,
which can cause incorrect styling when overriding.

This commit makes sure the order remains correct for multiple style
imports.

Fixes #575
usergenic referenced this issue in Polymer/polymer-bundler Jul 7, 2017
* Port of logic fix from #575
* Added tests to verify order of inlined stylesheets is correct.
* Updated CHANGELOG wrt the fix for reversed stylesheet imports.
@dfreedm
Copy link
Member

dfreedm commented Jul 7, 2017

Fixed with #577 in 1.x and #578 in master.

@dfreedm dfreedm closed this as completed Jul 7, 2017
@aomarks aomarks transferred this issue from Polymer/polymer-bundler Jan 3, 2019
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

3 participants