Skip to content

Commit 453aca8

Browse files
authored
Update the HTML Line-Wrapping guidance
This relaxes the guidance around indenting by 4 additional spaces and provides the Prettier format as one of the examples to ensure the style guide is compatible with the Prettier formatter.
1 parent d2cc2a7 commit 453aca8

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

htmlcssguide.html

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -447,9 +447,19 @@ <h4 id="HTML_Line-Wrapping" class="numbered">HTML Line-Wrapping</h4>
447447
<p>While there is no column limit recommendation for HTML, you may consider
448448
wrapping long lines if it significantly improves readability.</p>
449449

450-
<p>When line-wrapping, each continuation line should be indented at least 4
451-
additional spaces from the original line to distinguish wrapped attributes from
452-
child elements.</p>
450+
<p>When line-wrapping, each continuation line should be indented to distinguish
451+
wrapped attributes from child elements. Lines should be wrapped consistently
452+
within a project, ideally enforced by automated code formatting tools.</p>
453+
454+
<pre><code class="language-html good">&lt;button
455+
mat-icon-button
456+
color="primary"
457+
class="menu-button"
458+
(click)="openMenu()"
459+
&gt;
460+
&lt;mat-icon&gt;menu&lt;/mat-icon&gt;
461+
&lt;/button&gt;
462+
</code></pre>
453463

454464
<pre><code class="language-html good">&lt;button mat-icon-button color="primary" class="menu-button"
455465
(click)="openMenu()"&gt;

0 commit comments

Comments
 (0)