[WASM] Injected Hyperlink Css Style #10396
Replies: 2 comments 1 reply
-
For now, I just modified the /* Hyperlink Theme Aware Link Color https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme */
@media (prefers-color-scheme: dark)
{
.fluent-hyperlink-style a {
color: #FFFFFF;
}
}
@media (prefers-color-scheme: light) {
.fluent-hyperlink-style a {
color: #000000;
}
} This is fine for now as we control the stack, but would be handy to know an easier way to add this style chunk as part of the control itself. Reminds me of shadow doms for web components in a way... One suggestion was to just add a I feel like that would clutter the DOM a bit though with multiple instances of the component, would be kind of handy to have something that's shared/cached between instances of the control. i.e. define some control-local CSS snippet that can define whatever is needed. |
Beta Was this translation helpful? Give feedback.
-
My suggestion would be to used another Currently there is no support for shadow dom in Uno since it's no special effort has been put yet for uno to coexists with other technologies on the same browser page. It doesn't mean you can't use them, it's just there is no code in Uno for helping you doing it yet. |
Beta Was this translation helpful? Give feedback.
-
Originally asked on Discord
I'm creating a WASM interop component which injects some HTML into the DOM for its content. The HTML content I'm giving to
SetHtmlContent
content contains a link<a>
.How do I style the link to not be the default ugly BLUE color for hyperlinks and feel more like a native
Hyperlink
in fluent style?Is there some magic Uno CSS class I could apply to the root tag of my injected HTML with
SetCssClass
?Beta Was this translation helpful? Give feedback.
All reactions