Theming support via classes?
See original GitHub issueIt doesn’t seem like <Link/>
class tag is working?
If not, are there other ways to theme <Link/>
?
Issue Analytics
- State:
- Created 3 years ago
- Reactions:4
- Comments:8 (5 by maintainers)
Top Results From Across the Web
A guide to theming in CSS - LogRocket Blog
This tutorial shows you how to create apps that are theme-aware using CSS variables and JavaScript to enable a better presentation.
Read more >Best Practices - Using Classes within X Theme? - Support
We would like to define classes that specify the basic typography of our text; the color and weight; and the behavior (including responsive...
Read more >Creating a Custom Theme Class | Styling and Themes - Vaadin
Create Theme Class You can integrate a custom component theme to be used with the built-in Vaadin components. To do this, you need...
Read more >Understanding Responsive Support Classes - RocketTheme
Your guide to using responsive support classes in RocketTheme themes. ... Another useful feature available, via Bootstrap, is the collection of responsive utility ......
Read more >Theme Introduction - Classes - FuelPHP Documentation
The Theme class provides theming to your application. A theme will group theme templates (views) and assets, and allows you to change the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @kamiyaa!
Like @ronvdberkmortel pointed out the
getProps
prop function is used to give the underlying anchor tag custom attributes, but I will have to consider if all the extra props on theLink
should be spread on the anchor tag as well for simplicity’s sake. I’m not quite sure if there are any drawbacks to that at the moment, but I will look into it.I had the same problem and ended up using a NavLink component to add the relevant classes. Props to Emil for the package and the example that provided the base code. Since I am using Bootstrap 4 in combination with svelte-routing, I wanted to add the base nav-link class and conditionally add the active class.
components/NavLink.svelte
App.svelte
Hopefully this is useful to you and other users of the package.