Missing space between HTML elements
See original GitHub issueVersion
2.5.17
Reproduction link
https://github.com/revolter/website/tree/demo/missing-space-bug
Steps to reproduce
Run the app and navigate to the about
page.
What is expected?
A space between the abbr
and code
tags as in the About.vue
file.
What is actually happening?
The mentioned space is missing when rendered in the browser.
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
How to remove the space between inline/inline-block elements?
Applying a margin-right: -4px to the inline block elements will remove the spacing and is supported by all browsers. See the updated fiddle...
Read more >How to fix: No space between attributes. - Rocket Validator
Attributes in HTML elements need to be separated by space, in this example the first line is invalid and the second one is...
Read more >4 Easy Ways to Insert Spaces in HTML - HubSpot Blog
Learn how to insert multiple spaces in a row in HTML, how to add breaks between lines, and how to easily add whitespace...
Read more >Fighting the Space Between Inline Block Elements | CSS-Tricks
Fighting the Space Between Inline Block Elements · Remove the spaces · Negative margin · Skip the closing tag · Set the font...
Read more >How to remove spaces between html elements (when margin ...
Solution 1 ; div style · margin: 0; display: inline-block; float: left;" ; style type · text/css" ; div class · nospaces" ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Whitespace characters between HTML tags are removed because
preserveWhitespace
option in vue-loader is set tofalse
by default in vue-cli, here: https://github.com/vuejs/vue-cli/blob/dev/packages/%40vue/cli-service/lib/config/base.js#L87. In order to enable this option you have to modify webpack config using eitherchainWebpack
orconfigureWebpack
in your vue.config.js.https://cli.vuejs.org/guide/webpack.html#chaining-advanced
The first one is simpler imho, actually here’s what you need to do:
vue.config.js
You can also explicitly insert one using mustache: