minor #15836 [Form] fixed something: Remove whitespaces between <input> and <label> (ThomasLandauer)
This PR was submitted for the master branch but it was merged into the 2.7 branch instead (closes #15836).
Discussion
----------
[Form] fixed something: Remove whitespaces between <input> and <label>
| Q | A
| ------------- | ---
| Bug fix? | [no]
| New feature? | [no]
| BC breaks? | [?] What means BC?
| Deprecations? | [no]
| Tests pass? | [yes]
| Fixed tickets | []
| License | MIT
| Doc PR | []
Reason: With the whitespaces, there would be a "gap" between `<input>` and `<label>` which is clickable, but doesn't activate the `<input>`.
It's easy to *add* some margin with CSS, whereas it's impossible to *remove* whitespaces with CSS.
Commits
-------
1b97c17
Remove whitespaces between <input> and <label>
This commit is contained in:
commit
72f3fe1470
|
@ -206,10 +206,10 @@
|
|||
{% if label is not same as(false) -%}
|
||||
{% if not compound -%}
|
||||
{% set label_attr = label_attr|merge({'for': id}) %}
|
||||
{%- endif %}
|
||||
{%- endif -%}
|
||||
{% if required -%}
|
||||
{% set label_attr = label_attr|merge({'class': (label_attr.class|default('') ~ ' required')|trim}) %}
|
||||
{%- endif %}
|
||||
{%- endif -%}
|
||||
{% if label is empty -%}
|
||||
{%- if label_format is not empty -%}
|
||||
{% set label = label_format|replace({
|
||||
|
|
Reference in New Issue