Open AntoineLemaire opened 7 years ago
{% spaceless %}
does not do anything inside html tags. Have a look at the documentation.
Use the spaceless tag to remove whitespace between HTML tags, not whitespace within HTML tags or whitespace in plain text:
You can easily control/adjust whitespace to your liking using css ( white-space
). There's a nice interactive widget to play around with over at MDN Link
{{-
and -}}
can be used additionally to strip any whitespace inside tags.
Right, I had not enouth read the doc about {%spaceless% }
But this change has been introduce with https://github.com/braincrafted/bootstrap-bundle/commit/14906821a9d146e724293217ccb59d0fc59b0628
Sould we bring back the whitespace logic as before instead of add useless spaces which could break our javascript? In case of JS problem, CSS is unfortunately not an option
My form :
My twig :
Result :
Instead of
But I don't understand because it's work with that: https://github.com/Yoopies/bootstrap-bundle/commit/987e91da336e8515ab00f632ff44acfa5bcf470d, even if
choice_widget_options
block is under {% spaceless %}