【问题标题】:How to override a style in simple_form如何覆盖 simple_form 中的样式
【发布时间】:2016-07-14 23:48:42
【问题描述】:

我有这个 simple_form

      = f.association :offence_categories, collection: OffenceCategory.where(prefix: ''), as: :check_boxes, wrapper_html: {class: 'buttons buttons-offence_categories'}, label: ''

由于 check_boxes 类,它在标签前输出了一个项目符号

&::before
    content: ''
    width: 8px
    height: 8px
    border: 2px solid #999
    display: block
    float: left
    position: absolute
    top: 12px
    left: 10px
    +border-radius(8px)

我不想仅仅为了改变它而创建另一个类。我想在表单中进行本地样式更改以删除 %before

有人知道怎么做吗?

【问题讨论】:

    标签: ruby-on-rails haml simple-form


    【解决方案1】:

    抱歉,问题并不是真正的风格。子弹只是意味着它是必需的。

    我刚刚添加了required: false,子弹就不见了。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-06-22
      • 2011-09-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-08-05
      • 2019-02-17
      • 1970-01-01
      相关资源
      最近更新 更多