codecheck
102 строки · 2.1 Кб
1@use "sass:math";
2
3// core
4.p-chips {
5display: inline-flex;
6}
7
8.p-chips-multiple-container {
9margin: 0;
10padding: 0;
11list-style-type: none;
12cursor: text;
13overflow: hidden;
14display: flex;
15align-items: center;
16flex-wrap: wrap;
17}
18
19.p-chips-token {
20cursor: default;
21display: inline-flex;
22align-items: center;
23flex: 0 0 auto;
24}
25
26.p-chips-input-token {
27flex: 1 1 auto;
28display: inline-flex;
29}
30
31.p-chips-token-icon {
32cursor: pointer;
33}
34
35.p-chips-input-token input {
36border: 0 none;
37outline: 0 none;
38background-color: transparent;
39margin: 0;
40padding: 0;
41box-shadow: none;
42border-radius: 0;
43width: 100%;
44}
45
46.p-fluid .p-chips {
47display: flex;
48}
49
50// theme
51.p-chips {
52&:not(.p-disabled):hover {
53.p-chips-multiple-container {
54border-color: $inputHoverBorderColor;
55}
56}
57
58&:not(.p-disabled).p-focus {
59.p-chips-multiple-container {
60@include focused-input();
61}
62}
63
64.p-chips-multiple-container {
65padding: math.div(nth($inputPadding, 1), 2) nth($inputPadding, 2);
66outline-color: transparent;
67
68.p-chips-token {
69padding: math.div(nth($inputPadding, 1), 2) nth($inputPadding, 2);
70margin-right: $inlineSpacing;
71background: $chipBg;
72color: $chipTextColor;
73border-radius: $chipBorderRadius;
74
75&.p-focus {
76background: $chipFocusBg;
77color: $chipFocusTextColor;
78}
79
80.p-chips-token-icon {
81margin-left: $inlineSpacing;
82}
83}
84
85.p-chips-input-token {
86padding: math.div(nth($inputPadding, 1), 2) 0;
87
88input {
89font-family: var(--font-family);
90font-feature-settings: var(--font-feature-settings, normal);
91font-size: $inputTextFontSize;
92color: $textColor;
93padding: 0;
94margin: 0;
95}
96}
97}
98
99&.p-invalid.p-component > .p-inputtext {
100@include invalid-input();
101}
102}
103