【问题标题】:Remove Bootstrap 4 button outline Mixin删除 Bootstrap 4 按钮轮廓 Mixin
【发布时间】:2018-02-07 00:26:03
【问题描述】:

老实说,我不知道如何编写它来工作。我想要一个 sass mixin,它可以删除每个按钮往往具有的蓝色 Bootstrap 轮廓,所以我可以将它添加到我想要的按钮中。

有人可以帮我解决这个问题吗? 我尝试了一些方法,但它们基本上什么都不做。

【问题讨论】:

    标签: css twitter-bootstrap sass bootstrap-4 twitter-bootstrap-4


    【解决方案1】:

    你可以像这样设置 SCSS 变量:

    $btn-focus-width: 0;
    

    【讨论】:

    • 非常感谢!正是我想要的。
    【解决方案2】:

    你会得到这样的东西:

    @mixin outline($value) {
        outline: $value;
    }
    button {
      @include outline(0);
    }
    

    哪个输出:

    button {
      outline: 0;
    }
    

    查看演示 here

    【讨论】:

    • 谢谢你,迪帕斯!
    猜你喜欢
    • 1970-01-01
    • 2019-02-04
    • 2020-10-10
    • 2016-03-07
    • 2020-11-23
    • 1970-01-01
    • 2020-09-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多