Skip to content

为什么antd-select修改不了css #647

@YingZzz

Description

@YingZzz
  • I have searched the issues of this repository and believe that this is not a duplicate.

Version

1.3.7

Environment

vue

Steps to reproduce

less scoped
使用了自定义类名, :global{} 等.都不能改变select的css.
除非去掉scoped,但是这样会污染我其他的样式..

<a-select defaultValue="架空层" size="small" class="device-select">
         <a-select-option value="1">架空层</a-select-option>
          <a-select-option value="2">Lucy</a-select-option>
</a-select>


.device-select{
        width: 100%;
        :global {
            .ant-select-selection--single{
                background: red;   // 不生效
            }
        }
    }

其中 ant-select 可以改css,但是会被其他的select样式盖掉

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions