Problem/Motivation
Currently, the default values for margin and padding are set to _none, and these values are hardcoded so that the corresponding CSS classes are always added to the HTML output of blocks and sections.
As a result, even when a user does not explicitly set any margin or padding, the related classes are still rendered in the HTML markup. This behavior is unnecessary and counterintuitive.
If margin or padding is not defined, the corresponding CSS class should not be added at all.
Steps to reproduce
- Create or edit a block or section.
- Leave margin and padding unset (default values).
- Inspect the generated HTML markup on the frontend.
Proposed resolution
Do not add margin/padding classes when the value is _none
Comments
Comment #3
r_cheh commentedComment #4
r_cheh commentedComment #5
rollins commentedThose "_none " classes in HTML also annoyed me.
I have tested the #3 patch, and can confirm that it works as expected.
RTBC.