Aspnetcore: blazor-component in the DOM can interfere with CSS

Created on 21 Apr 2018  路  6Comments  路  Source: dotnet/aspnetcore

Hi,

I am creating a library of components for bootstrap 4 (a port of https://reactstrap.github.io/). I created components for Row and Col (which become <div class="row"> and <div class="col">). The problem is that Blazor adds tags around library components: <blazor-component> which interferes with bootstrap's css.

Reproduce:

  1. Follow the directions to create a BlazorApp with BlazorLib1.
  2. Follow the directions for adding Component1 to index.cshtml
  3. View the DOM for index,cshtml
  4. Note the blazor-component wrapping the html for Component1

Expected Result:
No added elements should be added to the DOM wrapping the html for Component1

area-blazor

Most helpful comment

@chanan I have the latest vsix and other bits from the myget feed
I don't have the <component-blazor> tags anymore
and the latest templates are also BS4

All 6 comments

See merged PR aspnet/Blazor#602 Therefore this will be resolved in the next release.

Thanks!

@chanan I have the latest vsix and other bits from the myget feed
I don't have the <component-blazor> tags anymore
and the latest templates are also BS4

@chanan Just so you know, I'm also working on a library of Bootstrap 4 components for Blazor. I'm doing this because we're considering using it directly from the default template. Perhaps we could join forces working on this together. Alternatively if you prefer to build something separately that's of course totally fine - maybe your approach will be preferable. Hope that's OK!

@SteveSandersonMS Sure thing! My lib is here: https://github.com/chanan/BlazorStrap Made some good progress so far. Take a look and let me know how you want to proceed in working on a combined solution.

@dotnetnoobie I also have the packages/vsix from myget, but still the <blazor-component>-Elements in the DOM. :-(
Problem fixed.

Was this page helpful?
0 / 5 - 0 ratings