变量可以使你的递归工作变得简单

变量声明

@buttonColor: #FF0000;

/ *现在你可以使用带有 css 函数的 @buttonColor 变量。 * /

.product.into.detailed {
    additional-attributes{
        .lib-table-button(
         background-color: @buttonColor;
         );
    }
}

函数 lib-tabgle-button 使用变量来设置背景颜色