deseretdigital-ui / CSS-Guidelines

High-level guidelines for writing manageable, maintainable CSS
0 stars 0 forks source link

80 character wide lines #2

Open jehoshua02 opened 9 years ago

jehoshua02 commented 9 years ago

The guidelines say "80 character wide columns" but I think it should say "80 character wide lines". I've been using 100, but don't mind switching to 80 for now.

Before Closing Issue:

rsahlstrom commented 9 years ago

I'd go with 80 is recommend, 120 is max. @deseretdigital-ui/front-end-developers

knitcodemonkey commented 9 years ago

I'm not sure what the relevance is here. Most css rules aren't very long to begin with, and if we're putting each rule on a separate line, then this shouldn't even come up.

rsahlstrom commented 9 years ago

This becomes more of an issue when you are doing complex styles such as multiple background images. For example, if you have a gradient on top, a background image behind that, and then an opaque layer on top of the background image, that line can get very long and hard to read. By splitting it up to multiple lines due to the 80 character limit, it becomes easier to read and allows for split view editing in VIM or sublime text, etc.

knitcodemonkey commented 9 years ago

Reading further down the document, I can also see they recommend the same length limit for use in comments. Whichever number we decide on, we need to make sure our comments match.

rsahlstrom commented 9 years ago

Agreed

hhatfield commented 9 years ago

:+1: