dotnet / MobileBlazorBindings

Experimental Mobile Blazor Bindings - Build native and hybrid mobile apps with Blazor
MIT License
1.2k stars 168 forks source link

Bootstrap CSS without at-rules for MBB #411

Closed johnmangam closed 2 years ago

johnmangam commented 2 years ago

Hi,

I see that At-rules are not supported for MBB yet. Could anyone tell me where I could find a bootstrap css or other css templates without at-rules for mobile app?

When I use a Page, using bootstrap is easy because I use HTML. The moment I start using a Shell, I am mandated to use a ContentPage and in ContentPage HTML is not allowed unlike in a Page. This forces me to use controls and style css without at-rules. Is this is the expected behavior, please?

BenMakesGames commented 2 years ago

I've been using @media rules successfully, including @media print... but that's the only "at rule" I've tried so far.

johnmangam commented 2 years ago

@BenMakesGames O, great! Is it in a Shell's ContentPage?

Eilon commented 2 years ago

There are two places to use CSS in Mobile Blazor Bindings:

  1. For native UI elements there is some limited CSS usage, which you can read about here: https://docs.microsoft.com/en-us/mobile-blazor-bindings/ui/css-styles
  2. For hybrid apps the HTML UI in a BlazorWebView has full CSS support (well, I'm sure there's some limitation, but not much)
johnmangam commented 2 years ago

Thank you so much for the information, @Eilon