8000 minor #15836 [Form] fixed something: Remove whitespaces between <inpu… · symfony/symfony@72f3fe1 · GitHub
[go: up one dir, main page]

Skip to content

Commit 72f3fe1

Browse files
committed
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>
2 parents 666f523 + 1b97c17 commit 72f3fe1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Symfony/Bridge/Twig/Resources/views/Form/form_div_layout.html.twig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,10 +206,10 @@
206206
{% if label is not same as(false) -%}
207207
{% if not compound -%}
208208
{% set label_attr = label_attr|merge({'for': id}) %}
209-
{%- endif %}
209+
{%- endif -%}
210210
{% if required -%}
211211
{% set label_attr = label_attr|merge({'class': (label_attr.class|default('') ~ ' required')|trim}) %}
212-
{%- endif %}
212+
{%- endif -%}
213213
{% if label is empty -%}
214214
{%- if label_format is not empty -%}
215215
{% set label = label_format|replace({

0 commit comments

Comments
 (0)
0