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

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

r_cheh created an issue. See original summary.

r_cheh’s picture

r_cheh’s picture

Status: Active » Needs review
rollins’s picture

Status: Needs review » Reviewed & tested by the community

Those "_none " classes in HTML also annoyed me.
I have tested the #3 patch, and can confirm that it works as expected.
RTBC.