Aberhart-school / abe-site

The website of William Aberhart high school
http://schools.cbe.ab.ca/b829/aberhart/
GNU General Public License v3.0
6 stars 8 forks source link

Multi-line tags and line length limit #175

Open thirstyice opened 8 years ago

thirstyice commented 8 years ago

We don't have any guidelines for tags that are longer than the line length limit due to having multiple attributes.

Options

Where to break

No break:

Option 1                         length limit-->|
<tag attribute1="attribute" attribute2="another considerably longer attribute"/>
Option 1                         length limit-->|

Break outside attribute:

Option 2                         length limit-->|
<tag attribute1="attribute"
    attribute2="another considerably longer attribute"/>
Option 2                         length limit-->|

Break at any whitespace:

Option 3                         length limit-->|
<tag attribute1="attribute" attribute2="another
    considerably longer attribute"/>
Option 3                         length limit-->|

Trailing angle bracket

Option a                         length limit-->|
<tag attribute1="attribute"
    attribute2="another considerably longer attribute"
/>
Option a                         length limit-->|
Option b                         length limit-->|
<tag attribute1="attribute" 
    attribute2="another considerably longer attribute"/>
Option b                         length limit-->|

Indenting

Option y                         length limit-->|
<tag attribute1="attribute" 
    attribute2="another considerably longer attribute"
/>
Option y                         length limit-->|
Option n                         length limit-->|
<tag attribute1="attribute" 
attribute2="another considerably longer attribute"
/>
Option n                         length limit-->|

My preference is for options 2ay That is, breaking outside of attributes, indenting subsequent lines, and having the final angle bracket on its own line.

Discuss/state preferences/alternatives.