Skip to content

FluentUI Blazor CSS #3687

Closed Answered by true-perfect-code
true-perfect-code asked this question in Q&A
Discussion options

You must be logged in to vote

Ok, I have found an efficient way to control custom HTML elements via Fluent CSS properties. This is especially important if you store the Fluent design-properties as user settings (I have already written about this in detail here, how to change font size, font colors, control colors etc. in FluentUI via DI/CSS).

As you have seen here, it does not work with Fluent that you have your own classes like with w3-CSS (because of Shadow-DOM). But you can still make it so that the settings that are changed via DI AccentBaseColor or DI NeutralBaseColor at runtime of the Blazor app also affect your own HTML elements. Here is how this works using the example of an HTML table:

  1. First create a css fil…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@true-perfect-code
Comment options

@vnbaaij
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by true-perfect-code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants