Skip to content

Commit 2dd2087

Browse files
bindoonyouluna
authored andcommitted
fix(Select): linear-gradient in safari fix #2228
1 parent 5f6a75c commit 2dd2087

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

docs/select/demo/max-count.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,14 @@ const maxTagPlaceholder = (selectedValues, totalValues) => {
4343
const style= { width: 200, marginRight: 8 };
4444

4545
ReactDOM.render(
46-
<div style={{display: 'flex'}}>
46+
<div style={{display: 'flex', alignItems: 'flex-start'}}>
4747
<Select placeholder="select all" hasSelectAll mode="multiple" onChange={handleChange} dataSource={dataSource} style={style} />
4848

4949
<Select maxTagCount={2} defaultValue={['10001', '10002', '-1']} mode="multiple" onChange={handleChange} dataSource={dataSource} style={style} />
5050

5151
<Select maxTagCount={2} maxTagPlaceholder={maxTagPlaceholder} defaultValue={['10001', '10002', '-1']} mode="multiple" onChange={handleChange} dataSource={dataSource} style={style} />
5252

53-
<Select maxTagCount={2} tagInline mode="multiple" defaultValue={['10001', '10002', '-1']} onChange={handleChange} dataSource={dataSource} style={style} /><br /><br />
53+
<Select maxTagCount={2} tagInline mode="multiple" defaultValue={['10001', '10002', '-1']} onChange={handleChange} dataSource={dataSource} style={style} /><br /><br />
5454
</div>
5555
, mountNode);
5656
````

src/select/main.scss

+14
Original file line numberDiff line numberDiff line change
@@ -478,4 +478,18 @@
478478
}
479479
}
480480

481+
@media screen and (-webkit-min-device-pixel-ratio: 0) {
482+
#{$select-prefix}-multiple {
483+
#{$select-prefix}-compact {
484+
#{$select-prefix}-tag-compact {
485+
background: linear-gradient(90deg, rgba(255, 255, 255, 0), $input-bg-color 10px);
486+
}
487+
}
488+
489+
.#{$css-prefix}disabled #{$select-prefix}-tag-compact {
490+
background: linear-gradient(90deg, rgba(255, 255, 255, 0), $input-disabled-bg-color 10px);
491+
}
492+
}
493+
}
494+
481495
@import "./rtl.scss";

0 commit comments

Comments
 (0)