Look into ways to pre-render styles in SSB
See original GitHub issueRight now, SSB works like this:
<p class="@div">If everything is working right, the background of this paragraph tag should be pink.</p>
@code {
private string div;
protected override async Task OnAfterRenderAsync()
{
div = await Styled.Css("background-color: pink;");
StateHasChanged();
}
}
While this works, it will cause a small flicker on the browser side because the plain html will be rendered first then “enhanced” with the css.
Is there a way the all the styles can be “pre-rendered” and set down with the html?
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:14 (7 by maintainers)
Top Results From Across the Web
The Secrets Behind Smash Bros. Renders - YouTube
64 CSS Origins ... Check my videos going into the history of characters and their evolution! ... Funny Super Smash Bros trivia and...
Read more >Render Request Stream (Get your Own Smash ... - YouTube
#2: One request at a time, and no multiple render requests in a row unless the turn-out is low #3: Be civil and...
Read more >HOW TO CHANGE CHARACTER'S COLORS IN Super Smash ...
In this video I'm gonna show you how you can change the appearance of your characters in Super Smash Bros ultimate by changing...
Read more >Super Smash Bros. Characters Archetypes Explained - YouTube
In this video, I discuss some of the common archetypes that smash characters fall into and how to most effetely use them in...
Read more >How to Create YOUR Playstyle in Smash Ultimate! - YouTube
Struggling with finding a main or playstyle to adapt? Here I give a step by step guide on how to determine if a...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I will take a look, thanks for the links!
Also, I forgot to mention, be sure to run development: false in production.
OK thanks, I’ll try that. Also, I’m not sure if you’re aware, but there’s this issue in Blazor repo https://github.com/dotnet/aspnetcore/issues/10170 and this tag https://github.com/dotnet/aspnetcore/labels/feature-blazor-css-isolation They plan to release it in preview7 of Blazor. Should be worth monitoring.
Also not sure if helpful but you can look into Skclusive’s library and how he handles styles there. https://github.com/skclusive/Skclusive.Core.Component/blob/master/src/Component/Styled.cs https://github.com/skclusive/Skclusive.Material.Component