-
Notifications
You must be signed in to change notification settings - Fork 159
HTML Coding Guidelines
For spacing, there are no spaces between tags and their content (<h2>content</h2>
instead of <h2> content </h2>
). Despite this, there must be spaced in the interpolation binding syntax and spaces around pipe operators. THis is a correct formatted binding: {{ variableOrFunction | pipe1 | pipe2:arg1:arg2 }}
.
Write HTML block wise. A block meaning a sematic block like in a table, one cell definition. Do not use empty lines there (except the content is huge; but use empty lines rarely). Separate sematic blocks with exact one empty line. If multiple blocks are wrapped by a tag, there is no space at the beginning and end:
<tr>
<td>Block with multiple lines</td>
<td>Block with multiple lines</td>
</tr>
If the blocks are short (e.g. 3-5 lines) empty lines are optional and may be leaved out. To clearly identify the section add short comments like <!-- State selector -->
.
Always use double-quotes for attribute values. If a tag has no content, close it directly without using a new line.
As for every file, leave one empty line at the bottom.
- DE:Konzept OpenSlides 4
- Update Workflow
- Architecture
- Introduction to functionality
- Restrictions
- Buildsystem
- Development organization
- Services
- Technical details
- Potential Optimizations
- Best practices for developers