Use root properties instead of the * selector
This works around https://github.com/vizia/vizia/issues/131, which was the reason why the vizia update was reverted.
This commit is contained in:
parent
eb49b0962e
commit
c02c23cb7f
|
@ -1,11 +1,5 @@
|
||||||
/* Overrides for default VIZIA widgets */
|
/* Overrides for default VIZIA widgets */
|
||||||
|
|
||||||
* {
|
|
||||||
color: #0a0a0a;
|
|
||||||
/* VIZIA uses points instead of pixels, this is 20px */
|
|
||||||
font-size: 15;
|
|
||||||
}
|
|
||||||
|
|
||||||
scrollview > vstack {
|
scrollview > vstack {
|
||||||
/* Normally the scroll bar overlaps with the content, so we'll add a little offset to prevent that */
|
/* Normally the scroll bar overlaps with the content, so we'll add a little offset to prevent that */
|
||||||
child-right: 15px;
|
child-right: 15px;
|
||||||
|
|
|
@ -167,6 +167,9 @@ impl Editor for ViziaEditor {
|
||||||
|
|
||||||
// TOOD: `:root { background-color: #fafafa; }` in a stylesheet doesn't work
|
// TOOD: `:root { background-color: #fafafa; }` in a stylesheet doesn't work
|
||||||
Entity::root().set_background_color(cx, Color::rgb(250, 250, 250));
|
Entity::root().set_background_color(cx, Color::rgb(250, 250, 250));
|
||||||
|
Entity::root().set_color(cx, Color::rgb(10, 10, 10));
|
||||||
|
// VIZIA uses points instead of pixels, this is 20px
|
||||||
|
Entity::root().set_font_size(cx, 15.0);
|
||||||
cx.add_theme(include_str!("../assets/theme.css"));
|
cx.add_theme(include_str!("../assets/theme.css"));
|
||||||
|
|
||||||
// There doesn't seem to be any way to bundle styles with a widget, so we'll always
|
// There doesn't seem to be any way to bundle styles with a widget, so we'll always
|
||||||
|
|
Loading…
Reference in a new issue