mirror of
https://github.com/tiennm99/HugoBlox-kit.git
synced 2026-10-06 12:12:39 +00:00
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:
1 parent
ad674e92cb
commit
c4f0317cdf
1 file changed
+6
@@ -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 }}
|
||||
|
||||
Reference in new issue
Block a user