Replies: 4 comments 6 replies
-
Why are the docs not helpful? What have you tried already? Did you try to find more general (as in Not specific for Blazor) design tokens documentation? |
Beta Was this translation helpful? Give feedback.
-
Here's what I've tried:
<NeutralLayer4>
<FluentStack ... ParentReference="@context">
...
</FluentStack>
</NeutralLayer4>
I've gone over the DesignTokens documentation multiple times, but I still can't figure out what I am doing wrong. |
Beta Was this translation helpful? Give feedback.
-
Okay, so I've adapted my code as follows: <FluentStack Orientation="Orientation.Vertical" VerticalGap="32" Style="padding: 30px" @ref="@stackRef">
</FluentStack>
@code {
FluentStack stackRef;
[Inject]
NeutralLayer4 nl4 { get; set; }
protected override async Task OnAfterRenderAsync(bool firstRender)
{
if(firstRender)
{
await nl4.SetValueFor(stackRef.Element, "#abc".ToSwatch()); //Tried removing this, tried changing values, but to no avail
StateHasChanged();
}
}
} but it didn't work, The stack panel didn't change. Additionally, I think there's a misunderstanding, I'm not exactly trying to change the color of a neutral layer, I am trying to put an element onto its own neutral layer so it would stand out keeping all the styling of that element (and that element alone) adjusted to the new layer's rules. I've even went to check the Blazor source code for the Card component (because it has its own layer) to see what I'm missing, but I couldn't find anywhere where it would have its neutral layer defined. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the help. I think Fluent UI just doesn't work for the use case I have. |
Beta Was this translation helpful? Give feedback.
-
Hi all,
I have a part of my app that I want to have a different neutral layer so that it appears highlighted and yet uses the same theme and follows the same design. That part is represented by the following code:
Is this a supported use case? If it is, how do I do it properly? Unfortunately, the design tokens documentation isn't particularly helpful. I've tried wrapping the outer stack with FillColor but to no avail. Technically, I could do with a css variable or a class name but I have no idea what they could be and/or where to find the list of supported ones.
Thank you,
Beta Was this translation helpful? Give feedback.
All reactions