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
[QUESTION] How to Style? #3
Comments
Hey, @jackchoumine I've looked into this and it's a limitation with the Shadow DOM which is what I'm using for this plugin. The best approach would be to add the <template id="dropdown">
<div>
<style>
.dropdown-toggle {
width: 100px;
height: 100px;
background-color: #f5f5f5;
}
</style>
<div @click="close" class="dropdown-toggle">
<button x-on:click="open">Open</button>
<div x-show="show" x-text="content"></div>
</div>
</div>
</template> I'm not a fan of that approach but I can't recommend anything else currently, might be something to research but I've hit a dead end with it. |
We can also import the global stylesheet directly: <template
id = "foo">
<div>
<link
href = "/css/bundle.css"
rel = "stylesheet"/>
<p
class = "text-xl">
Bar
</p>
</div>
</template> Since a browser would typically have this file cached, it should work well. This is not a suitable approach for CSS files that are split into chunks, but can get the job done for simple static sites made with tools like Hugo. |
style does not work
The text was updated successfully, but these errors were encountered: