-
-
Notifications
You must be signed in to change notification settings - Fork 312
Falsely detecting empty spacer columns #358
Comments
Seems like you should typically be able to accomplish the same thing without spacer columns by moving some styles from the column to the row. What's your real-world example where spacer columns seem necessary? Also, W009 is a Warning rather than an Error precisely because it may have false-positives. |
For example http://codepen.io/stephtr/full/grOmQe/ I reported it mainly because the twbs-lmvtfy bot treats these warnings as errors, but this is intentionally (cvrebert/lmvtfy#91). |
@stephtr The links in your comment are broken. Markdown links can be written as either just the raw URL, or as |
X-Ref: twbs/bootstrap#11130 |
I corrected the links (http://codepen.io/stephtr/full/grOmQe/ and http://itsashapechristmas.co.uk/ ). |
|
That website does not even use Bootstrap (it was intended to show where empty columns could be useful). I meant if someone would build a website like that with Bootstrap and insert colored spaces then there would be a W009. My suggestion would be to check not only if there are col-..-.. classes mentioned in the html code and if the element has no content but also if there are no custom classes (or classes other than col-..-..) mentioned. |
Eh, it's an imperfect heuristic either way. What if we just tweaked the warning message text to clarify that it's uncertain? |
Another option would be to ignore that border case and leave the warning message as it is (there probably are much more true-positives than false-positives). |
Empty columns can be used for styling, like
<div class="col-xs-1 col"></div>
withcol
defining a border or background-color. In this case W009's are detected even though the "empty" column can't be replaced.The text was updated successfully, but these errors were encountered: