diff --git a/doc/etemplate2/assets/images/styling_et2-label-fixed_1.png b/doc/etemplate2/assets/images/styling_et2-label-fixed_1.png new file mode 100644 index 0000000000..cd0c608104 Binary files /dev/null and b/doc/etemplate2/assets/images/styling_et2-label-fixed_1.png differ diff --git a/doc/etemplate2/assets/images/styling_et2-label-fixed_2.png b/doc/etemplate2/assets/images/styling_et2-label-fixed_2.png new file mode 100644 index 0000000000..339da59b1f Binary files /dev/null and b/doc/etemplate2/assets/images/styling_et2-label-fixed_2.png differ diff --git a/doc/etemplate2/assets/images/styling_et2-label-fixed_3.png b/doc/etemplate2/assets/images/styling_et2-label-fixed_3.png new file mode 100644 index 0000000000..169382d5ba Binary files /dev/null and b/doc/etemplate2/assets/images/styling_et2-label-fixed_3.png differ diff --git a/doc/etemplate2/pages/getting-started/styling.md b/doc/etemplate2/pages/getting-started/styling.md index 3d3fcea985..a8b9286594 100644 --- a/doc/etemplate2/pages/getting-started/styling.md +++ b/doc/etemplate2/pages/getting-started/styling.md @@ -24,3 +24,29 @@ Some handy excerpts: } ``` + +### Useful CSS classes + +#### hide + +Hides the element using css```display: none``` + +#### hideme + +Hides the element using css```display: none !important;``` + +#### et2-label-fixed + +Use on a widget to force its label to have a fixed width. This helps line up labels and widgets into columns without +having to use a grid, which allows them to reflow if needed. Set the CSS variable ```--label_width``` to change how much +space the labels get. + +These widgets are in an et2-vbox: + +| ![fixed label example #1](/assets/images/styling_et2-label-fixed_2.png ) | +|:-------------------------------------------------------------------------------------------------------:| +| *Without et2-label-fixed class* | +| ![fixed label example #2](/assets/images/styling_et2-label-fixed_1.png) | +| *Fixed width labels using et2-label-fixed* | +| ![fixed label example #3](/assets/images/styling_et2-label-fixed_3.png) | +| *--label_width CSS variable changed for more space*
Note how 'Responsible' widget wraps | \ No newline at end of file