Table column sizing

后端 未结 7 516
广开言路
广开言路 2020-11-27 02:33

In Bootstrap 3, I could apply col-sm-xx to the th tags in the thead and resize table columns at will. However this doesn

7条回答
  •  Happy的楠姐
    2020-11-27 02:59

    As of Alpha 6 you can create the following sass file:

    @each $breakpoint in map-keys($grid-breakpoints) {
      $infix: breakpoint-infix($breakpoint, $grid-breakpoints);
    
      col, td, th {
        @for $i from 1 through $grid-columns {
            &.col#{$infix}-#{$i} {
              flex: none;
              position: initial;
            }
        }
    
        @include media-breakpoint-up($breakpoint, $grid-breakpoints) {
          @for $i from 1 through $grid-columns {
            &.col#{$infix}-#{$i} {
              width: 100% / $grid-columns * $i;
            }
          }
        }
      }
    }
    

提交回复
热议问题