After playing around with your port of Fabric, I'm having trouble getting around one big problem with server-side blazor.
With server-side Blazor, you currently have to wait until after the first render for javascript interop to be available. As this library depends heavily on javascript since we are adding stylesheets via `, all of the controls show up in their unstyled state for a small amount of time before being transformed to their Fabric styles. It's pretty ugly.
It seems it might be a good idea to go without Javascript (as much as possible). I've tried an approach where I create a FabricStyle component that you stick somewhere near the root component. All it does is contain a <style></style> tag and watches an IObservable that outputs the latest set of css rules. It seems to work ok.
I don't have a solution for RTL or browser-specific prefixes yet though.
After playing around with your port of Fabric, I'm having trouble getting around one big problem with server-side blazor.
With server-side Blazor, you currently have to wait until after the first render for javascript interop to be available. As this library depends heavily on javascript since we are adding stylesheets via `, all of the controls show up in their unstyled state for a small amount of time before being transformed to their Fabric styles. It's pretty ugly.
It seems it might be a good idea to go without Javascript (as much as possible). I've tried an approach where I create a
FabricStyle
component that you stick somewhere near the root component. All it does is contain a<style></style>
tag and watches anIObservable
that outputs the latest set of css rules. It seems to work ok.I don't have a solution for RTL or browser-specific prefixes yet though.