Styling the widgets
3 min read
The WPM Fields widgets are styled with Elementor's own controls on the Style tab: typography, colors, spacing, borders and shadows. Each style section targets one part of the widget's markup. Fonts, colors and spacing otherwise come from your theme.
Style sections per widget
Control names are Elementor's: Typography, Color, Background color, Padding, Margin, Border, Border radius, Box shadow, Alignment, Width, Aspect ratio, Columns and Gap. Padding, margin, border radius, width, alignment, columns and gap are responsive (set per device).
Widget | Style section | Controls | Targets |
|---|---|---|---|
Field (free) | Field | Alignment, Margin |
|
Value | Typography, Color |
| |
Before and after | Typography, Color |
| |
Image | Width, Border radius, Border, Box shadow | images inside the field | |
Repeater | Layout | Columns, Gap |
|
Row | Background color, Padding, Border, Border radius, Box shadow |
| |
Label | Typography, Color |
| |
Value | Typography, Color |
| |
Field gallery | Layout | Columns, Gap |
|
Image | Aspect ratio, Border radius, Border, Box shadow |
| |
Caption | Typography, Color, Alignment |
| |
Post grid | Layout | Columns, Gap |
|
Card | Background color, Padding, Border, Border radius, Box shadow, Alignment |
| |
Image | Aspect ratio, Border radius |
| |
Title | Typography, Color, Margin |
| |
Text | Typography, Color, Margin | excerpt, field and date lines | |
Field label | Typography, Color |
| |
Button | Typography, Color, Background color, Padding, Border, Border radius |
| |
Pagination | Typography, Color, Margin, Alignment |
| |
Data table list | List | Typography, Color |
|
Header cells | Typography, Color, Background color, Padding, Border, Border radius | table header cells | |
Cards | the same |
| |
Field form | Form | Typography, Color |
|
Labels | Typography, Color |
| |
Inputs | Typography, Color, Background color, Padding, Border, Border radius |
| |
Submit button | the same |
|
The Aspect ratio control offers Original, 1:1, 4:3, 3:2, 16:9 and 3:4; a chosen ratio crops the image to fit (object-fit: cover).
The plugin's stylesheet
The widgets load a small stylesheet that only does layout:
- Post grid, gallery and repeater grid: a CSS grid with
--wpmcf-c-columnscolumns (default 3) and a--wpmcf-c-gapgap (default1.5rem; the repeater list uses1rem). The Columns and Gap controls set these two custom properties on the layout element, so you can also set them in your own CSS:.my-grid .wpmcf-c-grid { --wpmcf-c-columns: 2; }. - Images fill the width of their cell. The repeater table has a light bottom border per cell.
- The card is a column of items; the card button gets a thin border, a 4 px radius and inherits the text color until you style it.
- Editor hints are drawn as a dashed box.
The stylesheet is loaded only on pages that use a Repeater, Field gallery or Post grid widget. The Field widget needs none. The Data table list and the Field form load their own styles.
Classes you can target in your own CSS
Widget | Classes |
|---|---|
Field |
|
Repeater |
|
Field gallery |
|
Post grid |
|
Editor hints |
|
The printed values of the field types use their own classes (wpmcf-gallery, wpmcf-flexible, wpmcf-repeater); see Output, formats and escaping.
Troubleshooting
- My style changes do nothing. Elementor writes the style controls as selectors inside the widget wrapper; a theme rule with a higher specificity can win. Inspect the element and target the classes above.
- Columns or Gap have no effect. They set
--wpmcf-c-columnsand--wpmcf-c-gapon the layout element; a custom rule that setsgrid-template-columnsdirectly overrides them. - The widget looks unstyled in a cached page. Make sure your optimization plugin does not remove the plugin's
builders-frontstylesheet.
Still stuck? Contact support