Skip to content

Commit b228c33

Browse files
authored
Meta: expand on style rules in the README
In particular around newlines and naming.
1 parent f88ce74 commit b228c33

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

README.md

+33
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,39 @@ is.
8080
End tags must be omitted when possible and attribute values must not be quoted (if necessary, use
8181
double quotes).
8282

83+
Place one newline between paragraphs (including list elements). Place three newlines before `<h2>`,
84+
and two newlines before other headings. This does not apply when a nested heading follows the parent
85+
heading.
86+
87+
```html
88+
<ul>
89+
<li><p>Do not place a newline above.
90+
91+
<li><p>Place a newline above.
92+
</ul>
93+
94+
<p>Place a newline above.
95+
96+
97+
<h3>Place two newlines above.</h3>
98+
99+
<h4>Placing one newline is OK here.</h4>
100+
101+
102+
<h4>Place two newlines above.</h4>
103+
```
104+
105+
Use camel case for variable names and sentence case use spaced names for definitions, algorithms,
106+
etc.
107+
108+
```html
109+
<p>A <a for=/>request</a> has an associated
110+
<dfn export for=request id=concept-request-redirect-mode>redirect mode</dfn>,...
111+
```
112+
```html
113+
<p>Let <var>redirectMode</var> be <var>request</var>'s <a for=request>redirect mode</a>.
114+
```
115+
83116
## Merge policy
84117

85118
If you can commit to this repository, see the

0 commit comments

Comments
 (0)