I have a screen, it has a frame, it has a few more frames.
Is it possible to make one style prefix for the first frame (background color, padding position) and a separate prefix for child elements?
I tried like this but it didn't work:
(This is just the simplest example so as not to load the example with unnecessary code)
Code: Select all
screen statsDetail():
??? style_prefix 'statsDetail_outer statsDetail_inner' ???
frame:
grid 2 1:
frame:
vbox:
text '123s'
text '123s'
frame:
vbox:
text '345'
text '63634'
style statsDetail_outer_frame:
margin(120, 10)
background '#21293a'
padding
something else
style statsDetail_inner_frame:
background '#21293a'
margin(10, 10)
...
style statsDetail2inner_vbox:
background '#293448'
padding(10,10)
...
Because I want to set several changes for the first frame, but I don't want to write a prefix for each inner frame separately.
There is still a nuance: if I write the style for the first frame inside the frame itself, and for the child elements I use the style override by prefix, then I will have to override all changes for the first frame. For example, for child frames, I will specify indents 30, 30, but because of the prefix, these indents will be applied to the first frame, which means I will have to remove the indents (0,0) for it separately.
This applies to all other changes: width, height, alignment, etc.
Or maybe it's possible to specify a child element, as is done in CSS
Code: Select all
# this option does not throw an error, but the styles do not work at all
style_prefix 'statsDetail_outer statsDetail_inner'
# this option gives an error and swears that two prefixes are used
style_prefix 'statsDetail_outer'
style_prefix 'statsDetail_inner'
# style_prefix 'statsDetail_outer, statsDetail_inner'
# style_prefix 'statsDetail_outer' 'statsDetail_inner'
# style_prefix 'statsDetail_outer', 'statsDetail_inner'