Bug fixing

This commit is contained in:
Alexei Anoshenko 2024-06-19 16:36:50 +03:00
parent 27ebaf1bfe
commit d1d8c2af37
2 changed files with 18 additions and 7 deletions

View File

@ -790,6 +790,7 @@ func (view *viewData) addToCSSStyle(addCSS map[string]string) {
func (view *viewData) cssStyle(self View, builder cssBuilder) {
view.viewStyle.cssViewStyle(builder, view.session)
/*
switch GetVisibility(view) {
case Invisible:
builder.add(`visibility`, `hidden`)
@ -797,7 +798,7 @@ func (view *viewData) cssStyle(self View, builder cssBuilder) {
case Gone:
builder.add(`display`, `none`)
}
*/
if view.addCSS != nil {
for tag, value := range view.addCSS {
builder.add(tag, value)

View File

@ -174,6 +174,16 @@ func (style *viewStyle) backgroundCSS(session Session) string {
func (style *viewStyle) cssViewStyle(builder cssBuilder, session Session) {
if visibility, ok := enumProperty(style, Visibility, session, Visible); ok {
switch visibility {
case Invisible:
builder.add(`visibility`, `hidden`)
case Gone:
builder.add(`display`, `none`)
}
}
if margin, ok := boundsProperty(style, Margin, session); ok {
margin.cssValue(Margin, builder, session)
}