-
-
Notifications
You must be signed in to change notification settings - Fork 470
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
style-loader/useable: There is a need to be able to control the order of inserting styles. #326
Comments
@budarin I think it is out of scope |
Hi! here it's repo, please try I would prefer to add one parameter to use()/ref(0 method - direction (to add above or under the last style tag) |
@evilebottnawi |
Hi! You can simply solve this problem with addin an empty stylesheet with an id and inserting new styles just after it (when insertAt='bottom' & order='reverse') and just add styles on the top of page's head (when insertAt='top' & order='reverse') |
is there anyone here? |
@budarin no right now, refactoring |
Anyway feel free to send a PR with PoC for better communication and implementation |
thanks for good news :) |
I think we need new api for this case, let's do it for 2.0.0, anyway feel free to send a PR if you need this as soon as possible |
Any news with this? I'm having the same problem |
Feel free to send a PR |
Do you want to request a feature or report a bug?
Feature
What is the current behavior?
When call stylesheet.use() - styles added on to a page in order as they were added - one after previous
If the current behavior is a bug, please provide the steps to reproduce.
What is the expected behavior?
React has a reverse order of calling the component (style.use() called into each component in our project) so there may be a conflict of style overrides.
Styles should be inserted in reversed order - one before previous
If this is a feature request, what is motivation or use case for changing the behavior?
there is no any other ability to control the insertion order of styles
Please mention other relevant information such as your webpack version, Node.js version and Operating System.
"webpack": "4.8.1",
"style-loader": "^0.21.0",
node: 10.0.0
OS: Windows Server 2008R2
The text was updated successfully, but these errors were encountered: