Skip to content

Commit 9431d0d

Browse files
authored
fix(module:select): remove inline style (CSP compliant) (#8873)
1 parent 63c8953 commit 9431d0d

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

components/select/option-item.component.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ import { NzIconModule } from 'ng-zorro-antd/icon';
3636
}
3737
</div>
3838
@if (showState && selected) {
39-
<div class="ant-select-item-option-state" style="user-select: none" unselectable="on">
39+
<div class="ant-select-item-option-state" unselectable="on">
4040
@if (!icon) {
4141
<span nz-icon nzType="check" class="ant-select-selected-icon"></span>
4242
} @else {

components/select/style/index.less

+4-1
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,9 @@
172172
background: @select-clear-background;
173173
cursor: pointer;
174174
opacity: 0;
175-
transition: color 0.3s ease, opacity 0.15s ease;
175+
transition:
176+
color 0.3s ease,
177+
opacity 0.15s ease;
176178
text-rendering: auto;
177179

178180
&::before {
@@ -278,6 +280,7 @@
278280

279281
&-state {
280282
flex: none;
283+
user-select: none;
281284
}
282285

283286
&-active:not(&-disabled) {

0 commit comments

Comments
 (0)