[Design / Themes] How to simplify theme management? #1049
Replies: 12 comments 23 replies
-
That is exactly what I was looking for and trying to achieve with The requirements are always as you describe:
This would really be very much appreciated! |
Beta Was this translation helpful? Give feedback.
-
This is exactly the problem I was trying to solve. For what I can tell I could apply different themes to different components with this approach, right? For example, I am now working on a project where the vertical nav bar uses a dark theme, but the rest of the site a light theme. In this case I would just use two different |
Beta Was this translation helpful? Give feedback.
-
Generally in favor - some input:
|
Beta Was this translation helpful? Give feedback.
-
For now, the theme/color updates the default variables. So the entire website. |
Beta Was this translation helpful? Give feedback.
-
The choice to use design tokens over all is a welcome thought, however when we compare what approach industry is using right now, it looks somewhat lacking or maybe I do not fully understand it. As commented here: #942 The projects which I work on require specific colors (i.e. primary button, primary button hovered etc.), accent base color does not meet those needs. When I think of Blazor I think of React but in .NET :) The other great part is that you could export base theme and then reuse it for different project, this is something I would love to be able to do with this framework. I.e. save it as a separate NuGet package within the company repository and reuse it later. The problem with Blazor Server at this point is flickering (probably does not happen on WASM) If we look into alternative frameworks you will see that they try to accomplish this (still not perfect but better) and you can actually avoid flickering for the most part (except for Dark/Light theme, but there are workarounds) https://www.mudblazor.com/customization/overview#variables (the framework I ended up using and created my own theme with MS looks with company colors, then exported it as a NuGet package) What I personally don't like is that this framework locks you to use base accent color and if you want to override for a specific button you actually have to use CSS and cannot define it from code (or maybe you can but it does not look straight forward) Blazor actually does a great job at "namespacing" CSS to that specific component: However, maybe its jut me and others don't find it a problem at all. Hope this gives some context. |
Beta Was this translation helpful? Give feedback.
-
We pushed this PR #1093 to include these features. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
This project needs a page like what the Radzen team has whipped up |
Beta Was this translation helpful? Give feedback.
-
I really like FluentUI for Blazor and I've been pushing it to my team to use it as well. I use the default settings and have only set the accent color. I use
I also use But when I want to add to option for dark-mode strange things happen. Eventually I want the mode set to If this could be made simpler or better documentation with examples could be added, would be a lifesaver. |
Beta Was this translation helpful? Give feedback.
-
Maybe jump in too late. For my understanding, this component is based on fluent ui web component and this project is related to Fast, right ? What I do not understand is why the "fast color explorer" https://color.fast.design/ calculate other colours from AccentBaseColor as this library. On Fast, the accentFillRest is (with background 0 ) the same as the Accent Base Color, on this library not. I also looks that the accentFillHover is darker as the accentFillRest on fast, on this library its lighter. Can someone tell me why? PS: there i a second Fast demo on https://www.fast.design/ where you can set Mode , Neutral Color Accent color, Border radius Stroke width and density. In my opinion the new FluentDesignTheme component should provide this properties |
Beta Was this translation helpful? Give feedback.
-
Because that color site is using an older version of the adaptive color picker Denis was talking about, The most current and up-to-date color eplorer can be found here: https://fluent-components.azurewebsites.net/?path=/docs/design-system-color-explorer--page
Border radius, stoke width and density can all be manipulated with our Design Token implementation. These offer advanced options which we do not want to make broadly and easily available. We don't do that because we do not want to make it easy to break out of the Fluent Design System. Isn't that a bit opinionated? Yes, but as it is our library, we can do that. |
Beta Was this translation helpful? Give feedback.
-
Quick question as we've noticed |
Beta Was this translation helpful? Give feedback.
-
Introduction
We've received a number of questions concerning the management of Design Tokens, which allow you to customize the graphic style of components. We believe that this management is certainly very useful for in-depth customization of graphic elements (customization of typography, borders, various sizes, etc.), but that we often need a few simple functions:
💡 Please feel free to give us your comments on this proposal: Does this work for you? Is other information missing, etc.?
Proposition / solution
We're trying to simplify this by creating:
fluent-design-theme
(name still subject to change) that will be accessible from the client side (for management "before" Blazor renders - for example, to avoid a flash between the Light and Dark themes).Attributes
theme
: Choose between Dark, Light or System themeapp-name
: Allows you to apply the main color of Microsoft applications (Access, Booking, Exchange, Excel, GroupMe, Office, OneDrive, OneNote, Outlook, Planner, PowerApps, PowerBI, PowerPoint, Project, Publisher, SharePoint, Skype, Stream, Sway, Teams, Visio, Windows, Word, Yamme, Word).color
: Allows you to define a custom color for your project (HEX format). Example:#ff0000
for red.Example
Beta Was this translation helpful? Give feedback.
All reactions