-
Notifications
You must be signed in to change notification settings - Fork 450
(feature) Design tokens #142
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
Conversation
Clean up DesignToken
-Move ChildContent and AdditionalAttributes to FluentComponentBase -Remove empty code behind files
-Housekeeping (fix compiler warnings)
β¦tion at start up (with added extension method).
Azure Static Web Apps: Your stage site is ready! Visit it here: https://brave-cliff-0c0c93310-142.centralus.azurestaticapps.net |
Azure Static Web Apps: Your stage site is ready! Visit it here: https://brave-cliff-0c0c93310-142.centralus.azurestaticapps.net |
Azure Static Web Apps: Your stage site is ready! Visit it here: https://brave-cliff-0c0c93310-142.centralus.azurestaticapps.net |
src/Microsoft.Fast.Components.FluentUI/wwwroot/DesignTokenInterop.js
Outdated
Show resolved
Hide resolved
src/Microsoft.Fast.Components.FluentUI/wwwroot/DesignTokenInterop.js
Outdated
Show resolved
Hide resolved
Azure Static Web Apps: Your stage site is ready! Visit it here: https://brave-cliff-0c0c93310-142.centralus.azurestaticapps.net |
Azure Static Web Apps: Your stage site is ready! Visit it here: https://brave-cliff-0c0c93310-142.centralus.azurestaticapps.net |
@vnbaaij Let's use this PR as an opportunity to start the collaboration with @williamw2. After you both have reviewed it, I think it's fine to merge and make a new release. |
@EisenbergEffect Totally agree!
Totally agree. I got a bit caried away with reorganizing things that should not have been done here. |
Add ControlCornerRadius example
Replase fdsp in ToolbarPage Add missing FillColor design token
Add parameterless constructor to all design tokens
Azure Static Web Apps: Your stage site is ready! Visit it here: https://brave-cliff-0c0c93310-142.centralus.azurestaticapps.net |
Azure Static Web Apps: Your stage site is ready! Visit it here: https://brave-cliff-0c0c93310-142.centralus.azurestaticapps.net |
Azure Static Web Apps: Your stage site is ready! Visit it here: https://brave-cliff-0c0c93310-142.centralus.azurestaticapps.net |
Azure Static Web Apps: Your stage site is ready! Visit it here: https://brave-cliff-0c0c93310-142.centralus.azurestaticapps.net |
.state-override { | ||
--card-width: 350px; | ||
--card-height: 300px; | ||
--elevation: 6; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Setting --elevation
used to be the way the card got its shadow, but this has been replaced with direct tokens like elevationShadowCardRest
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where is elevationShadowCardRest
defined? I've only looked at DesignTokens.ts for which tokens to generate.
src/Microsoft.Fast.Components.FluentUI.Generators/DesignTokenConstants.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Fast.Components.FluentUI.Generators/DesignTokenConstants.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Fast.Components.FluentUI/DesignTokens/DesignToken.razor.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Fast.Components.FluentUI/DesignTokens/DesignToken.razor.cs
Show resolved
Hide resolved
src/Microsoft.Fast.Components.FluentUI.Generators/DesignTokenGenerator.cs
Show resolved
Hide resolved
Azure Static Web Apps: Your stage site is ready! Visit it here: https://brave-cliff-0c0c93310-142.centralus.azurestaticapps.net |
Update README
Azure Static Web Apps: Your stage site is ready! Visit it here: https://brave-cliff-0c0c93310-142.centralus.azurestaticapps.net |
Fix #114 |
Pull Request
π Description
This PR enables working with DesignTokens from the c# side
π« Issues
#114
π©βπ» Reviewer Notes
A
DesignTokens
class which exposes all the predefined tokens as properties has been added. All the token names have been defined as public c# const in theDesignTokenNames
class.In
Progam.cs
you addbuilder.Services.AddFluentUIComponents()
. This is an extension method that adds the new DesignTokens 'service' to the DI container. This is also being leveraged for adding the IconService for the FluentIcon implementation.When needed you can inject the
DesignTokens
instance and call the DesignToken methods (SetValueFor
,GetValueFor
,DeleteValueFor
andWithDefaults
) on an ElementReference , i.efor this
index.razor
fileβ Checklist
General
β Next Steps
TBD