Layout - Class apply fix

features/nuget_autobuild
stm 2 years ago
parent f4c89aed85
commit 56cef22d26

@ -178,9 +178,9 @@ public partial class Drawer : UIComponent, IDisposable, INavigationEventReceiver
return new StyleBuilder()
.AddStyle(StyleList)
.AddStyle("width", Width, !string.IsNullOrWhiteSpace(Width) && !Fixed)
.AddStyle("--mud-drawer-width", Width, !string.IsNullOrWhiteSpace(Width) && (!Fixed || Variant == DrawerVariant.Temporary))
.AddStyle("drawer-width", Width, !string.IsNullOrWhiteSpace(Width) && (!Fixed || Variant == DrawerVariant.Temporary))
.AddStyle("height", Height, !string.IsNullOrWhiteSpace(Height))
.AddStyle("--mud-drawer-content-height", string.IsNullOrWhiteSpace(Height) ? _height.ToPx() : Height, Anchor == Anchor.Bottom || Anchor == Anchor.Top)
.AddStyle("drawer-content-height", string.IsNullOrWhiteSpace(Height) ? _height.ToPx() : Height, Anchor == Anchor.Bottom || Anchor == Anchor.Top)
.AddStyle("visibility", "hidden", string.IsNullOrWhiteSpace(Height) && _height == 0 && (Anchor == Anchor.Bottom || Anchor == Anchor.Top));
}

@ -34,7 +34,7 @@ public partial class DrawerContainer : UIComponent
}
className += $"-{drawer.GetPosition()}";
className += $" mud-drawer-{drawer.GetPosition()}-clipped-{drawer.ClipMode.ToDescription()}";
className += $"drawer-{drawer.GetPosition()}-clipped-{drawer.ClipMode.ToDescription()}";
return className;
}
@ -117,10 +117,10 @@ public partial class DrawerContainer : UIComponent
{
return new StyleBuilder()
.AddStyle(StyleList)
.AddStyle("--mud-drawer-width-left", GetDrawerWidth(FindLeftDrawer()), !string.IsNullOrEmpty(GetDrawerWidth(FindLeftDrawer())))
.AddStyle("--mud-drawer-width-right", GetDrawerWidth(FindRightDrawer()), !string.IsNullOrEmpty(GetDrawerWidth(FindRightDrawer())))
.AddStyle("--mud-drawer-width-mini-left", GetMiniDrawerWidth(FindLeftMiniDrawer()), !string.IsNullOrEmpty(GetMiniDrawerWidth(FindLeftMiniDrawer())))
.AddStyle("--mud-drawer-width-mini-right", GetMiniDrawerWidth(FindRightMiniDrawer()), !string.IsNullOrEmpty(GetMiniDrawerWidth(FindRightMiniDrawer())));
.AddStyle("drawer-width-left", GetDrawerWidth(FindLeftDrawer()), !string.IsNullOrEmpty(GetDrawerWidth(FindLeftDrawer())))
.AddStyle("drawer-width-right", GetDrawerWidth(FindRightDrawer()), !string.IsNullOrEmpty(GetDrawerWidth(FindRightDrawer())))
.AddStyle("drawer-width-mini-left", GetMiniDrawerWidth(FindLeftMiniDrawer()), !string.IsNullOrEmpty(GetMiniDrawerWidth(FindLeftMiniDrawer())))
.AddStyle("drawer-width-mini-right", GetMiniDrawerWidth(FindRightMiniDrawer()), !string.IsNullOrEmpty(GetMiniDrawerWidth(FindRightMiniDrawer())));
}
}

@ -9,7 +9,7 @@ public partial class Layout : DrawerContainer
get
{
return new CssBuilder("layout")
.AddClass(base.ClassList);
.AddClass(base.CompiledClassList.Build());
}
}
@ -18,7 +18,7 @@ public partial class Layout : DrawerContainer
get
{
return new StyleBuilder()
.AddStyle(base.StyleList);
.AddStyle(base.CompiledStyleList.Build());
}
}

Loading…
Cancel
Save