bootstrap 中 mixin 的作用是什么?

What is the role of mixins in bootstrap?

我是bootstrap的初学者,我无法理解这个概念。

下面的less代码是什么意思?

// Creates  wrapper for a series of columns

.make-row(@gutter: @grid-gutter-width) {

  // Then clear the floated columns
  .clearfix();

  @media (min-width: @screen-sm-min) {
    margin-left:  (@gutter / -2);
    margin-right: (@gutter / -2);
  }

  // Negative margin nested rows out to align the content of columns
  .row {
    margin-left:  (@gutter / -2);
    margin-right: (@gutter / -2);
  }
}

您是否已经尝试将此 mixin 的用法编译到 css 中?我认为这是不言自明的。 Mixins 可以像简单函数一样处理(带参数或不带参数)。

Look at the compiled code.