If a theme is set the font-size changes automatically to 16px instead of 13 px.
It is not possible to get the body element a font-size in css. It only works normal if the font-size is set in index.html.
Cheers,
Domi
If a theme is set the font-size changes automatically to 16px instead of 13 px.
It is not possible to get the body element a font-size in css. It only works normal if the font-size is set in index.html.
Cheers,
Domi
Im not sure i follow… … … example?
Are you something like, if you set the font size on the body in the .html haxeui doesnt respect it and overwrites it with its default (13px) size?
Ian
For example the property-grid from component-examples.
If it is compiled without any style the font-size is 13px.
If it is compiled with the theme “kenney” for example it changes to 16px.
I added:
body {
font-size: 13px;
}
in css but it is ignored.
If the font-size is set in .html it works normal.
Cheers,
Domi
You mean added that in the haxeui css? “body” doesnt mean anything in a haxeui application. Maybe an example might be helpful.
Here is a little example:
https://drive.google.com/file/d/1uc3eSFIbut7epmB-vGOSkVCKMgsK5X70/view?usp=sharing
Cheers,
Domi
OK, i see what you mean, so the first thing is that “body” means nothing at all in haxeui (its not html), so that will never match anything. The second issue is you’d need to match on individual components (or a specific rule to match a subset), eg:
All text based components:
.label, .textfield, .textarea {
font-size: 10px;
}
All text based components in the property grid:
.property-grid .label, .property-grid .textfield {
font-size: 10px;
}
However, i appreciate this less than ideal. I wonder if an “app” would make sense… so you could just do:
.app {
font-size: 10px;
}
or “global”, or “root”? Dunno which is more sensible… thoughts?
Yes i wanted to set the font-size for all components.
“global” sound good to me.
Cheers,
Domi
Hang on… i was being dumb… there is already a facility to do this in css… doh!
* {
font-size: 10px;
}
or
.property-grid * {
font-size: 10px;
}
etc
Oh dammit
Thanks anyway.
Cheers,
Domi