You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think the "killer feature" of Blazor should be the following syntax of razor controllers.
// Component.razor
<Container>
<HeaderSize="12">
<Congratulation>Jack</Congratulation>
</Header>
</Container>
@css{// simple css, injected immediately background:red;
}@css red {// named css, injected immediately ...
}
//tags is a scoped components that automatically generates tag as described below
@tag Container:Div {// inherits predefined tag@css{...
}@code{...
}}@tag Header:H1 {@idsomeId@onclickClicked@code{
[Parameter]
publicintSize{get; set; }voidClicked()
{}}@css{font-size:@Size;
}}@component Congratulation {// that is a regular component
<span>Dear, @content.Thanks!</span> // directly provides content@css{background:red;
}}@component BtnBase {
<btn@onclick="OnClick">@content</btn>
@code{voidOnClick()
{}}@cssbtnStyle{...
}@css:hover{// elements's selector...
}@tagBadge{// scoped in BtnBase...
}@componentBtnRed:BtnBase{// Scoped and inherited@stylered; // includes named css@css{... // this css merges with or replaces parent's css, }}}@component BtnBlack:BtnBase {// just inherits@css{... // this css merges with or replaces parent's css, }}
It solves most cases of frontend development and should be implemented in future releases.
The main idea of components id similarity to "components" in /Pages dir.
Tags just provides fast and scoped way to write
and their css or scss styling.
It seems that layout components are an obsolete way of providing @content slots (as it called in Vue).
Just provide an opportunity to use it everywhere.
The text was updated successfully, but these errors were encountered:
Thanks for contacting us, @datdefboi.
This is not something we plan to do. We do plan to review and potentially improve CSS support / interaction in the future.
I think the "killer feature" of Blazor should be the following syntax of razor controllers.
It solves most cases of frontend development and should be implemented in future releases.
The main idea of components id similarity to "components" in /Pages dir.
Tags just provides fast and scoped way to write
It seems that layout components are an obsolete way of providing @content slots (as it called in Vue).
Just provide an opportunity to use it everywhere.
The text was updated successfully, but these errors were encountered: