Open Ruto8 opened 8 years ago
There are three solutions that poped into my head
span.ui-typo__serif-bigger.ui-posts__dropdown-header(
class="ui-posts__dropdown-bg-hack post-list__state"
)
span(
class="ui-posts__dropdown-bg-hack post-list__state\
ui-typo__serif-bigger ui-posts__dropdown-header"
)
@Ruto8 We can simply tolerate too long line if it contains one word. I can simple checker for circleCi but it's required to extract from git only lines modified since some date to avoid too big changes.
git log --pretty=format: --name-only --since="2016-01-01" | sort | uniq
Imho we shouldn't be overengineering this.
We could however think about creating more readable class names and get rid of redundant stuff. Like the hack
thing in the example. And ui-typo__serif-bigger
which is also not correct BEM. Additionally SMACSS could be our solution here. If the element is so complex that it requires so many classes – maybe it should be converted to a new component? Sure, there are perks of combining elements from smaller classes, so we avoid creating new ones. But the moment we start to reuse this combinations this might become painful and hard to manage.
@Ruto8 @kubakrzempek @Machiaweliczny WDYT?
PS I also don't like the multiline syntax for class=""
attribute.
Some time ago, we agreed that 80 characters are insuficient and started to use 100 characters per line as our guideline. I was looking for that in our guidelines, and when I couldn't find that, surprised I was.
Before making a pull-request with that, I think we need a discussion about template files. As I noticed, we're often exceeding 100 characters per line, becuase of BEM classes. As an example:
I can think of 2 solutions
Is there anything we can do about it or how should we proceed? Should we add this guideline at all?