|
1 | 1 | :host { |
2 | | - --pf-c-chip--PaddingTop: var(--pf-global--spacer--xs, 0.25rem); |
3 | | - --pf-c-chip--PaddingRight: var(--pf-global--spacer--sm, 0.5rem); |
4 | | - --pf-c-chip--PaddingBottom: var(--pf-global--spacer--xs, 0.25rem); |
5 | | - --pf-c-chip--PaddingLeft: var(--pf-global--spacer--sm, 0.5rem); |
6 | | - --pf-c-chip--BackgroundColor: var(--pf-global--Color--light-100, #fff); |
7 | | - --pf-c-chip--BorderRadius: var(--pf-global--BorderRadius--sm, 3px); |
8 | | - --pf-c-chip--before--BorderColor: var(--pf-global--BorderColor--300, #f0f0f0); |
9 | | - --pf-c-chip--before--BorderWidth: var(--pf-global--BorderWidth--sm, 1px); |
10 | | - --pf-c-chip--before--BorderRadius: var(--pf-c-chip--BorderRadius); |
11 | | - --pf-c-chip--m-overflow__text--Color: var(--pf-global--primary-color--100, #06c); |
12 | | - --pf-c-chip--m-draggable--BackgroundColor: var(--pf-global--BackgroundColor--200, #f0f0f0); |
13 | | - --pf-c-chip--m-draggable--BoxShadow: var(--pf-global--BoxShadow--sm, 0 0.0625rem 0.125rem 0 rgba(3, 3, 3, 0.12), 0 0 0.125rem 0 rgba(3, 3, 3, 0.06)); |
14 | | - --pf-c-chip--m-draggable__icon--FontSize: var(--pf-global--icon--FontSize--sm, 0.625rem); |
15 | | - --pf-c-chip__text--FontSize: var(--pf-global--FontSize--xs, 0.75rem); |
16 | | - --pf-c-chip__text--Color: var(--pf-global--Color--100, #151515); |
17 | | - --pf-c-chip__c-button--PaddingTop: var(--pf-global--spacer--xs, 0.25rem); |
18 | | - --pf-c-chip__c-button--PaddingRight: var(--pf-global--spacer--sm, 0.5rem); |
19 | | - --pf-c-chip__c-button--PaddingBottom: var(--pf-global--spacer--xs, 0.25rem); |
20 | | - --pf-c-chip__c-button--PaddingLeft: var(--pf-global--spacer--sm, 0.5rem); |
21 | | - --pf-c-chip__c-button--MarginTop: calc(var(--pf-c-chip--PaddingTop) * -1); |
22 | | - --pf-c-chip__c-button--MarginRight: calc(var(--pf-c-chip--PaddingRight) * -1); |
23 | | - --pf-c-chip__c-button--MarginBottom: calc(var(--pf-c-chip--PaddingBottom) * -1); |
24 | | - --pf-c-chip__c-button--MarginLeft: var(--pf-global--spacer--sm, 0.5rem); |
25 | | - --pf-c-chip__c-button--FontSize: var(--pf-global--FontSize--xs, 0.75rem); |
26 | | - --pf-c-chip__c-badge--MarginLeft: var(--pf-global--spacer--xs, 0.25rem); |
27 | | - --pf-c-chip__icon--MarginLeft: var(--pf-global--spacer--sm, 0.5rem); |
28 | | - display: contents; |
29 | | - min-width: 0; |
30 | | - padding: 0; |
31 | | - list-style: none; |
32 | | -} |
33 | | - |
34 | | -*[hidden], |
35 | | -:host([hidden]) { |
36 | | - display: none !important; |
37 | | -} |
38 | | - |
39 | | -#outer { |
40 | | - display: inline-flex; |
41 | | - align-items: center; |
42 | | - justify-content: space-between; |
43 | | - background-color: var(--pf-c-chip--BackgroundColor); |
44 | | - border-radius: var(--pf-c-chip--BorderRadius); |
45 | | - border: var(--pf-c-chip--before--BorderWidth) solid var(--pf-c-chip--before--BorderColor); |
| 2 | + --pf-c-chip--PaddingTop: var(--pf-global--spacer--xs, 0.25rem); |
| 3 | + --pf-c-chip--PaddingRight: var(--pf-global--spacer--sm, 0.5rem); |
| 4 | + --pf-c-chip--PaddingBottom: var(--pf-global--spacer--xs, 0.25rem); |
| 5 | + --pf-c-chip--PaddingLeft: var(--pf-global--spacer--sm, 0.5rem); |
| 6 | + --pf-c-chip--BackgroundColor: var(--pf-global--Color--light-100, #fff); |
| 7 | + --pf-c-chip--BorderRadius: var(--pf-global--BorderRadius--sm, 3px); |
| 8 | + --pf-c-chip--before--BorderColor: var(--pf-global--BorderColor--300, #f0f0f0); |
| 9 | + --pf-c-chip--before--BorderWidth: var(--pf-global--BorderWidth--sm, 1px); |
| 10 | + --pf-c-chip--before--BorderRadius: var(--pf-c-chip--BorderRadius); |
| 11 | + --pf-c-chip--m-overflow__text--Color: var(--pf-global--primary-color--100, #06c); |
| 12 | + --pf-c-chip--m-draggable--BackgroundColor: var(--pf-global--BackgroundColor--200, #f0f0f0); |
| 13 | + --pf-c-chip--m-draggable--BoxShadow: var(--pf-global--BoxShadow--sm, 0 0.0625rem 0.125rem 0 rgba(3, 3, 3, 0.12), 0 0 0.125rem 0 rgba(3, 3, 3, 0.06)); |
| 14 | + --pf-c-chip--m-draggable__icon--FontSize: var(--pf-global--icon--FontSize--sm, 0.625rem); |
| 15 | + --pf-c-chip__text--FontSize: var(--pf-global--FontSize--xs, 0.75rem); |
| 16 | + --pf-c-chip__text--Color: var(--pf-global--Color--100, #151515); |
| 17 | + --pf-c-chip__text--MaxWidth: 16ch; |
| 18 | + --pf-c-chip__c-button--PaddingTop: var(--pf-global--spacer--xs, 0.25rem); |
| 19 | + --pf-c-chip__c-button--PaddingRight: var(--pf-global--spacer--sm, 0.5rem); |
| 20 | + --pf-c-chip__c-button--PaddingBottom: var(--pf-global--spacer--xs, 0.25rem); |
| 21 | + --pf-c-chip__c-button--PaddingLeft: var(--pf-global--spacer--sm, 0.5rem); |
| 22 | + --pf-c-chip__c-button--MarginTop: calc(var(--pf-c-chip--PaddingTop) * -1); |
| 23 | + --pf-c-chip__c-button--MarginRight: calc(var(--pf-c-chip--PaddingRight) / 2 * -1); |
| 24 | + --pf-c-chip__c-button--MarginBottom: calc(var(--pf-c-chip--PaddingBottom) * -1); |
| 25 | + --pf-c-chip__c-button--FontSize: var(--pf-global--FontSize--xs, 0.75rem); |
| 26 | + --pf-c-chip__c-badge--MarginLeft: var(--pf-global--spacer--xs, 0.25rem); |
| 27 | + --pf-c-chip__icon--MarginLeft: var(--pf-global--spacer--sm, 0.5rem); |
| 28 | + color: var(--pf-global--Color--100, #151515); |
| 29 | + position: relative; |
| 30 | + display: inline-flex; |
| 31 | + align-items: center; |
| 32 | + min-width: 0; |
| 33 | + list-style: none; |
| 34 | + background-color: var(--pf-c-chip--BackgroundColor); |
| 35 | + border-radius: var(--pf-c-chip--BorderRadius); |
46 | 36 | padding: |
47 | 37 | var(--pf-c-chip--PaddingTop) |
48 | 38 | var(--pf-c-chip--PaddingRight) |
49 | 39 | var(--pf-c-chip--PaddingBottom) |
50 | 40 | var(--pf-c-chip--PaddingLeft); |
51 | 41 | } |
52 | 42 |
|
53 | | -:host([overflow-chip]) { |
54 | | - color: var(--pf-c-chip--m-overflow__text--Color); |
| 43 | +[hidden], |
| 44 | +:host([hidden]) { |
| 45 | + display: none !important; |
55 | 46 | } |
56 | 47 |
|
57 | | -.chip-content { |
58 | | - display: inline-flex; |
59 | | - align-items: center; |
| 48 | +div#outer { |
| 49 | + display: contents; |
60 | 50 | } |
61 | 51 |
|
62 | | -.chip-content { |
63 | | - color: var(--pf-c-chip__text--Color); |
64 | | - font-family: var(--pf-global--FontFamily--sans-serif, "RedHatTextUpdated", "Overpass", overpass, helvetica, arial, sans-serif); |
65 | | - font-size: var(--pf-c-chip__text--FontSize); |
66 | | - font-weight: var(--pf-global--FontWeight--normal, 400); |
67 | | - line-height: 1.6; |
68 | | - overflow-x: hidden; |
69 | | - overflow-y: hidden; |
| 52 | +#outer:before { |
| 53 | + position: absolute; |
| 54 | + top: 0; |
| 55 | + right: 0; |
| 56 | + bottom: 0; |
| 57 | + left: 0; |
| 58 | + content: ""; |
| 59 | + border: var(--pf-c-chip--before--BorderWidth) solid var(--pf-c-chip--before--BorderColor); |
| 60 | + border-radius: var(--pf-c-chip--before--BorderRadius); |
| 61 | +} |
| 62 | + |
| 63 | +span { |
| 64 | + overflow: hidden; |
70 | 65 | text-overflow: ellipsis; |
71 | | - display: inline-flex; |
72 | | - text-wrap: nowrap; |
73 | 66 | white-space: nowrap; |
74 | | - flex: 0 0 auto; |
| 67 | + position: relative; |
| 68 | + max-width: var(--pf-c-chip__text--MaxWidth); |
| 69 | + font-size: var(--pf-c-chip__text--FontSize); |
| 70 | + color: var(--pf-c-chip__text--Color); |
75 | 71 | } |
76 | 72 |
|
77 | | -:host([readonly]) .chip-content { |
| 73 | +:host([readonly]) span { |
78 | 74 | color: var(--pf-global--Color--200, #6a6e73); |
79 | 75 | } |
80 | 76 |
|
| 77 | +/* OVERFLOW */ |
| 78 | + |
| 79 | +button#outer { |
| 80 | + display: flex; |
| 81 | + background: none; |
| 82 | + border: 1px solid transparent; |
| 83 | +} |
| 84 | + |
| 85 | +button#outer span { |
| 86 | + color: var(--pf-c-chip--m-overflow__text--Color); |
| 87 | +} |
| 88 | + |
| 89 | +/* CLOSE */ |
| 90 | + |
81 | 91 | #close-button { |
82 | | - background-color: transparent; |
83 | | - border: none; |
84 | | - color: var(--pf-global--Color--dark-200, #6a6e73); |
85 | | - display: inline-flex; |
86 | | - align-items: center; |
87 | | - justify-content: center; |
88 | | - min-height: 44px; |
89 | | - min-width: 44px; |
90 | | - margin: var(--pf-c-chip__c-button--MarginTop) |
91 | | - var(--pf-c-chip__c-button--MarginRight) |
92 | | - var(--pf-c-chip__c-button--MarginBottom) |
93 | | - var(--pf-c-chip__c-button--MarginLeft); |
94 | | - padding: var(--pf-c-chip__c-button--PaddingTop) |
95 | | - var(--pf-c-chip__c-button--PaddingRight) |
96 | | - var(--pf-c-chip__c-button--PaddingBottom) |
97 | | - var(--pf-c-chip__c-button--PaddingLeft); |
| 92 | + --pf-icon--size: 12px; |
| 93 | + --pf-c-button--PaddingTop: var(--pf-c-chip__c-button--PaddingTop); |
| 94 | + --pf-c-button--PaddingRight: var(--pf-c-chip__c-button--PaddingRight); |
| 95 | + --pf-c-button--PaddingBottom: var(--pf-c-chip__c-button--PaddingBottom); |
| 96 | + --pf-c-button--PaddingLeft: var(--pf-c-chip__c-button--PaddingLeft); |
| 97 | + --pf-c-button--FontSize: var(--pf-c-chip__c-button--FontSize); |
98 | 98 | } |
99 | 99 |
|
100 | | -svg { |
| 100 | +#close-button::part(button) { |
| 101 | + display: inline-block; |
| 102 | + margin-top: var(--pf-c-chip__c-button--MarginTop); |
| 103 | + margin-right: var(--pf-c-chip__c-button--MarginRight); |
| 104 | + margin-bottom: var(--pf-c-chip__c-button--MarginBottom); |
101 | 105 | vertical-align: -0.125em; |
102 | | - width: var(--pf-c-chip__text--FontSize, 12px); |
103 | | - height: var(--pf-c-chip__text--FontSize, 12px); |
104 | 106 | } |
105 | 107 |
|
106 | 108 | ::slotted(pf-badge) { |
|
0 commit comments