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
bootstrap_3_layout.html.twig with inline-form has no spacing #25831
Comments
This sure is an interesting issue. I can confirm that this behavior is reproducible. However, reading the boostap docs: http://getbootstrap.com/docs/3.3/css/#forms, I see that inline forms are expected to have like this. Ie, there is nothing we could do about it. You should remove "form-inline" and you will be better off. (maybe 😕 ) Here is an image from the docs: I suggest closing this issue. |
Well if the code to render the html form would just output a newline character after each form element, the problem would be solved. |
Im not sure that is correct. HTML does not really care about new lines. |
but the newline character would be interpreted like a space character. You have to understand that the browsers interpret the form fields like "one word" because there is absolutely no space between them. Try my fiddle, as soon as you give a space or newline, the form is displayed correctly. |
I did try your fiddle. I did not see any difference from before and after clicking the "tidy" button. |
which browser are you using? on my chrome, I see a difference if i just up a newline after each form-group-div: |
Im on Firefox and Safari. Same results. Same in your fiddle and same on the bootstrap docs. I cannot see that whitespace matters. |
Now I also tried with Safari, and I do see a difference. Please try these two fiddles: This is the original output (this time on Safari): and this is the result with newlines (/5/): |
@flaushi Would you like to send a pull request? |
Maybe I missed something, but if we are talking about "inline forms", then the proposed change doesn't make sense to me. "Inline forms" display all fields in the same line (and in Bootstrap examples you'll see that most of the times they hide the labels). The proposal here changes the default "inline form" design completely ... so I think it'd be better to not use "inline form" in this case and use normal forms and control the length of each field to display them in a single row. |
I think you misunderstood the problem. I was not complaining about the label, I am missing the little margin between the text input fields. |
…orms (xabbuh) This PR was merged into the 3.4 branch. Discussion ---------- [TwigBridge] fix horizontal spacing of inlined Bootstrap forms | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #25831 | License | MIT | Doc PR | Commits ------- 7113a53 fix horizontal spacing of inlined Bootstrap forms
Perfect, thanks!!! |
Thank you for the confirmation. 👍 |
Hi,
I am using the bootstrap_3_layout.html.twig and configure the following form:
as result, I see the following:
So, there is no space between the form elements.
The created html looks fine, however, I have read here that maybe a only a space/newline is missing?
This Fiddle shows my created html code. If you just click on "Tidy" the newlines are created and the spaces appear.
The text was updated successfully, but these errors were encountered: