-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Unable to use <style at="Head" in DisplayDriver<Navbar> #14743
Comments
Have you tried adding style to your view?
|
Will this repeatedly render the elements? |
Hi @MikeAlhayek , <style asp-name="amis"></style>
<style asp-name="amis-cxd"></style>
<style asp-name="amis-helper"></style>
<style asp-name="amis-iconfont"></style> they can't work in a style block , I think ~ <style at="Head">
<style asp-name="amis"></style>
<style asp-name="amis-cxd"></style>
<style asp-name="amis-helper"></style>
<style asp-name="amis-iconfont"></style>
</style>
|
This should work
However, it does not work because the Navbar shape is created after the head resources is already rendered. PR #14743 should fix this. But, for now try injecting the resource into
|
Hi @MikeAlhayek , <style at="Head" asp-name="amis"></style>
<style at="Head" asp-name="amis-cxd"></style>
<style at="Head" asp-name="amis-helper"></style>
<style at="Head" asp-name="amis-iconfont"></style> |
@hyzx86 it should be included in 17809+ so you should have seen the fix. Are you use a custom theme or layout? |
@hyzx86 strange. It worked when I submitted the PR. Now, I cleaned up my local environment and it returns different result. Maybe some weird caching problem I had locally. Anyhow, I submitted another PR #14755 and it seems to be working as it should. If you like, please add a layout file in to your custom theme with the same change as done in #14755 and see if that fixes the problem. |
How to use NavbarTop after removal Using <style at="Head"
A while back I asked a question about how to introduce styles in the top menu bar
#13603
At the suggestion of @ns8482e I changed the code to the following
However, NavbarTop was removed in OC 1.8, I changed it to
DisplayDriver<Navbar>
based on other menu buttonsBut the problem came back. Still unable to import styles to Head
The text was updated successfully, but these errors were encountered: