HTML: Remove unnecessary indentation (force no base indentation)
See original GitHub issueInput
The code looked like this before beautification:
<div>
Hello world
</div>
Expected Output
The code should have looked like this after beautification:
<div>
Hello world
</div>
Actual Output
The code actually looked like this after beautification:
<div>
Hello world
</div>
Steps to Reproduce
- Write some HTML with the very first tag indented
- Beautify
- Observe that the first tag indentation has not been removed. Instead, all other tags have followed suit in using the unnecessary indentation.
See #51 - it looks like this is the designed behavior, but it may be that I accidentally indent the first tag, and I’d prefer to have every file start with no indentation. Any chance of adding a setting for this?
Settings
{
"end_with_newline": true,
"indent_size": 2,
"html": {
"wrap_attributes": "force-aligned"
},
"css": {
"space_around_selector_separator": true
}
}
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
How to remove indentation from an unordered list item?
I want to remove all indentation from ul . I tried setting margin , padding , text-indent to 0 , but no avail....
Read more >How to remove indentation from an unordered list item using ...
To remove that indentation from an unordered list (a list having bullets) there needs styling to be done using CSS. The style will...
Read more >Consistent list indentation - CSS: Cascading Style Sheets | MDN
Since we have no padding for the <ul> element, its content wraps snugly around the three list items. Now we add the list...
Read more >How to indent or tab text on a web page or in HTML
Steps on how to create a tab or indent text on a web page or in HTML.
Read more >VS Code tips — Indentation settings and the ... - YouTube
VS Code shows the indentation settings for the current in the status bar. Click on this entry to quickly change the tab size...
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
For anyone trying this it should be
"indent_level": 0
(underscore, not dash), though, like @bitwiseman says, it does not seem to make a difference.@cbejensen You’d be surprised what breaks whom for this library. We’ve defined the value as a number so we’ll use
-1
.