Reputation: 4172
I have the next component:
<Select
mode="multiple"
placeholder="Inserted are removed"
value={selectedItems}
onChange={this.handleChange}
style={{ width: "100%" }}
>
{filteredOptions.map(item => (
<Select.Option key={item} value={item}>
{item}
</Select.Option>
))}
</Select>
.ant-select-item-option-content {
background-color: red;
}
.ant-select-item-option-active:not(.ant-select-item-option-disabled) {
height: 10px;
background-color: blue;
height: auto;
}
Why height:10px;
does not work? And how to apply 10px of heigth for that selector?
Upvotes: 1
Views: 252
Reputation: 350
You should remove height:auto:
.ant-select-item-option-content {
background-color: red;
height: 5px;
}
.ant-select-item-option-active:not(.ant-select-item-option-disabled) {
height: 10px;
background-color: blue;
}
Or perhaps you need something like this:
.ant-select-item-option-content {
background-color: red;
}
.ant-select-item-option-active:not(.ant-select-item-option-disabled) {
height: 10px;
background-color: blue;
height: auto;
}
.ant-select-item-option-active:not(.ant-select-item-option-disabled) .ant-select-item-option-content {
background-color: blue;
}
Upvotes: 1
Reputation: 4938
I checked your link. It seems like there is another style rule thats applying a min-height:32px;
to the active element.
Either remove that or include min-height
in your CSS like so:
.ant-select-item-option-active:not(.ant-select-item-option-disabled) {
min-height: 10px;
height: 10px;
background-color: blue;
}
Upvotes: 0