feat: enable non-rectangular widget styles

Introduces `design.clip_path` widget option.

Refer to CSS docs on `clip-path` for use.

E.g. to create a slanted bottom to a widget:

```
[design]
clip_path = "polygon(0 0,100% 0,100% 80%,0% 100%)"

[design.background]
color = "navy"
text_color_light = true
```
This commit is contained in:
George Cushen 2020-07-12 19:36:30 +01:00
commit c4f0317cdf

View file

@ -59,6 +59,12 @@
{{ $style = print $style $style_pad }}
{{ end }}
{{/* Support for clip path (design.clip_path) */}}
{{ with $st.Params.design.clip_path }}
{{ $style_clip_path := printf "clip-path: %s;" . }}
{{ $style = print $style $style_clip_path }}
{{ end }}
{{ with $st.Params.advanced.css_style }}
{{ $style = print $style . }}
{{ end }}