-
-
Notifications
You must be signed in to change notification settings - Fork 311
E029
Since grid classes apply to devices with screen widths greater than or equal to the breakpoint sizes (unless overridden by grid classes targeting larger screens), class="..."
is redundant and can be simplified to class="..."
Grid classes apply to devices with screen widths greater than or equal to the breakpoint sizes, unless overridden by grid classes targeted at larger devices. This means that it's not necessary to repeat the same grid column width for adjacent breakpoints.
For example, class="col-sm-6"
will make the element 6 columns wide on small (sm
), medium (md
), and large (lg
) screens. Therefore, class="col-sm-6 col-md-6 col-lg-6"
and class="col-sm-6 col-md-6"
are both equivalent to class="col-sm-6"
, which should be preferred since it's simpler and less verbose.
In contrast, class="col-sm-6 col-md-3 col-lg-6"
cannot be simplified.
Bootlint documentation wiki content is licensed under the CC BY 3.0 License, and based on Bootstrap's docs which are copyright Twitter, Inc.