Merge branch 'master' of github.com:jean-emmanuel/open-stage-control

This commit is contained in:
bordun 2020-05-23 12:26:55 +02:00
commit 6e548ae48b
7 changed files with 37 additions and 22 deletions

View file

@ -1,5 +1,11 @@
# CSS Tips
## Browser inspector
Hit `F12` to open the developers tools panel. The html/css inspector helps retreiving the class names needed to style specific parts of the widgets
## Inline syntax
For simple use cases, the `css` property can be written as a HTML inline styles (without any CSS selector). CSS rules will apply to the widget element.
@ -84,19 +90,3 @@ Media queries can also be used:
[CSS variables](https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_custom_properties) declared in the [default theme](https://github.com/jean-emmanuel/open-stage-control/blob/master/src/scss/themes/default.scss) can be overriden.
Widgets also rely on CSS variables for the style properties (colors, padding, etc). These are documented in the widgets' `css` property description.
## Other tips
#### Use the inspector
Hit `F12` to open the developers tools panel. The html/css inspector helps retreiving the class names needed to style specific parts of the widgets.
#### Panel's background-color
This works for panel, strip and tabs:
```css
> .panel {
background-color: red;
}
```

View file

@ -64,6 +64,14 @@ Returns the property called `"name"` of the first matching widget.
----
#### `updateProp`: `function(id, name)`
- `id`: widget `id` as a string. Can be `"this"` to target the host widget, or `"parent"` to target the parent widget.
- `name`: property name.
Forcers a widget to check if one of its properties has changed and update itself if needed.
----
#### `httpGet`: `function(url, callback)`
- `url`: url of the resource to fetch (local url only)