8000 [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

Conversation

ThomasLandauer
Copy link
Contributor
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.

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.
@Tobion
Copy link
Contributor
Tobion commented Sep 18, 2015

@ThomasLandauer so I assume you render the form manually with the label after the input? Otherwise the whitespace would be before the label and not between label and input.

Looks good. 👍
Status: Reviewed

@ThomasLandauer
Copy link
Contributor Author

No, in my case it is about radio buttons (type 'choice'). As far as I understand, the label rendering mechanism is the same as for text-input's.

@Tobion
Copy link
Contributor
Tobion commented Sep 18, 2015

I see

@fabpot
Copy link
Member
fabpot commented Sep 18, 2015

Thank you @ThomasLandauer.

fabpot added a commit that referenced this pull request Sep 18, 2015
…t> 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>
@fabpot fabpot closed this Sep 18, 2015
@ThomasLandauer ThomasLandauer deleted the patch-1 branch June 16, 2016 18:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0