Newline character in HtmlTag causes unwanted whitespace

Created on 2 September 2011, over 13 years ago
Updated 24 July 2024, 5 months ago

A '\n' (newline) character is included at the end of every tag output by theme_html_tag(). This causes extra whitespace that may not always be desired. One specific example is for use with sprite icons that are included within links.

<a href="#"><span class="sprite"></span>Text</a> 

If the span above is rendered using theme_html_tag() then there will be extra whitespace between the icon and the text because of the newline character. Any spacing would be better controlled by css (margin or padding).

Related CR https://www.drupal.org/node/2019739

🐛 Bug report
Status

Needs work

Version

11.0 🔥

Component
Theme 

Last updated about 18 hours ago

Created by

🇺🇸United States draenen

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024