Skip to content

Commit d946840

Browse files
committed
fix bulma css
1 parent 918d817 commit d946840

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

htagui/bulma/bases.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ def init(self,metatag,obj):
161161
self["style"].set("right","0px")
162162
self["style"].set("left","0px")
163163
self["style"].set("z-index","500")
164-
self["style"].set("background","white")
164+
self["style"].set("background","Canvas") # <system-color> : 'Background of application content or documents'
165165
self <= obj
166166

167167
class ModalAlert(ModalBlock):
@@ -173,6 +173,7 @@ def __init__(self,metatag,obj,wsize:float=None):
173173
obj = Tag.div(obj,_class="box")
174174
obj=Tag.div(obj,_class="modal-content",_onmousedown="event.stopPropagation();")
175175
ModalBlock.__init__(self,metatag,obj)
176+
self["style"].set("z-index","501") # ensure alerts are over "page"
176177
self.childs[0]["onmousedown"]=metatag.stepevent()
177178
if pwidth:
178179
obj["style"]=f"width:{pwidth};"
@@ -217,7 +218,7 @@ def init(self,metatag,obj,mode:str):
217218
t,r,b,l= ("0px","0px",f"{size}%","0px")
218219

219220
self <= Voile(_onmousedown=metatag.stepevent())
220-
self <= Tag.div( obj ,_style=f"position:fixed;top:{t};bottom:{b};left:{l};right:{r};background:white;border-radius:0px;box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;;z-index:1001;padding:10px")
221+
self <= Tag.div( obj ,_style=f"position:fixed;top:{t};bottom:{b};left:{l};right:{r};background:Canvas;border-radius:0px;box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;;z-index:1001;padding:10px")
221222

222223
class Pop(Tag.div):
223224
def init(self,metatag,obj,xy:tuple):

manual_tests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ def block(ev):
161161
self.ui.block( Tag.div(ui.Spinner()+ui.Button("unblock",_onclick=lambda ev: self.ui.close() ) + ui.Menu(entries)) + "click on the menu should auto-close the dialog" )
162162

163163
def page(ev):
164-
self.ui.page( "click on the menu shouldn't close the dialog !!!"+ui.Menu(entries) + Tag.h3("Click the image to quit")+Tag.img(_src="https://picsum.photos/501/501",_onclick=lambda ev: self.ui.page()) )
164+
self.ui.page( "click on the menu shouldn't close the dialog !!!"+ui.Menu(entries) + ui.Button("alert",_onclick=lambda ev: self.ui.alert('yo'))+ Tag.h3("Click the image to quit")+Tag.img(_src="https://picsum.photos/501/501",_onclick=lambda ev: self.ui.page()) )
165165

166166
self <= ui.Button("block", _onclick=block)
167167
self <= ui.Button("page", _onclick=page)

0 commit comments

Comments
 (0)