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

Head elements output in random order #14

Open
TheShrug opened this issue Jan 16, 2021 · 2 comments
Open

Head elements output in random order #14

TheShrug opened this issue Jan 16, 2021 · 2 comments

Comments

@TheShrug
Copy link

First off, thank you for this!

In troubleshooting some meta properties I noticed that they are rendered to the DOM in at least a semi-random order. Is there perhaps an option that I'm missing to output the order of elements in the order that they are declared in my razor pages?

If this isn't part of the feature-set and it is possible to do this, I would be glad to submit a pull request for it!

Thank you again,
TheShrug

@jsakamoto
Copy link
Owner

Thank you for posting.
Yes, this library renders meta/link elements as semi-random order.
And this library doesn't provide a way to control the ordering of those elements.

This is one of the weak points of this library.
I have been interested in this problem that how to resolve this issue since I produce this library.
But I have never coming up with a cool idea to resolve this issue yet.

This problem is very hard to resolve smarty, I think.
What is the "correct" ordering of the meta/link elements?
How can developers control the ordering?
Those are very deep consideration points on the code design.

If you have any cool ideas to resolve this issue, could you tell me your code design, before sending the pull request to me?

@Alerinos
Copy link

I think the first render should be from layout and the next from pages. Why so? Because we often load e.g. main.css and sometimes we want to fix the subpage, so to overwrite the changes, the css code must be loaded below the code from the layout.

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

No branches or pull requests

3 participants