10000 [Form] fixed something: Remove whitespaces between <input> and <label> by ThomasLandauer · Pull Request #15836 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[Form] fixed something: Remove whitespaces between <input> and <label> #15836

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Remove whitespaces between <input> and <label>
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.
  • Loading branch information
ThomasLandauer committed Sep 18, 2015
commit 05c618d7671388a4a0a2dab96383a2c592b9538a
Original file line number Diff line number Diff line change
Expand Up @@ -211,10 +211,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({
Expand Down
0