|
10 | 10 | } |
11 | 11 |
|
12 | 12 | #hxFileTile { |
13 | | - background-color: @gray-50; |
14 | | - border-radius: 2px; |
15 | | - border: 2px solid transparent; |
16 | | - color: @gray-900; |
17 | 13 | display: flex; |
18 | 14 | font-size: 0.875rem; //14px |
19 | 15 | height: 100%; |
20 | 16 | width: 100%; |
21 | 17 | } |
22 | 18 |
|
| 19 | + // TODO: add hooks for overriding retry button colors? |
23 | 20 | #hxRetry { |
24 | 21 | #Button.basic(); |
25 | 22 | #Button.small(); |
26 | 23 | #Button.tertiary(); |
27 | 24 |
|
28 | 25 | hx-icon { |
29 | | - // FIXME |
30 | 26 | margin-left: 0.25rem !important; |
31 | 27 | } |
32 | 28 | } |
33 | 29 |
|
34 | 30 | #hxDismiss { |
| 31 | + color: var(--hxDismiss-color, inherit); |
35 | 32 | flex-shrink: 0; |
36 | 33 | font-size: 1rem; |
37 | 34 | line-height: 0; |
38 | 35 | padding: 0.5rem 0.75rem; |
39 | 36 |
|
40 | 37 | &:hover { |
41 | | - color: @cyan-500; |
| 38 | + color: var(--hxDismiss-color--hover, @cyan-500); |
42 | 39 | } |
43 | 40 |
|
44 | 41 | &:focus { |
45 | | - border-color: @cyan-700; |
46 | | - box-shadow: @focus-glow; |
| 42 | + box-shadow: var(--hxDismiss-boxShadow--focus, @focus-glow); |
47 | 43 | outline: 0; |
48 | 44 | } |
49 | 45 | } |
50 | 46 |
|
51 | 47 | #hxIconWrapper { |
52 | 48 | align-items: center; |
| 49 | + color: var(--hxIcon-color, inherit); |
53 | 50 | display: flex; |
54 | 51 | flex: 0 0 48px; |
55 | 52 | height: 100%; |
|
73 | 70 | } |
74 | 71 |
|
75 | 72 | #hxName { |
76 | | - color: @cyan-900; |
| 73 | + color: var(--hxName-color, @cyan-900); |
77 | 74 | display: flex; |
78 | 75 | font-weight: 500; |
79 | 76 |
|
| 77 | + // truncation children |
80 | 78 | > span { |
81 | 79 | white-space: pre; |
82 | 80 |
|
83 | 81 | &:first-child { |
84 | 82 | overflow: hidden; |
85 | 83 | text-overflow: ellipsis; |
86 | 84 | } |
| 85 | + |
87 | 86 | &:last-child { |
88 | 87 | flex-shrink: 0; |
89 | 88 | } |
|
98 | 97 | } |
99 | 98 |
|
100 | 99 | #hxLink { |
101 | | - color: @gray-900; |
102 | 100 | display: flex; |
103 | 101 | flex-grow: 1; |
104 | 102 | overflow: hidden; |
105 | 103 |
|
106 | | - &[href]:hover { |
107 | | - color: @cyan-500; |
| 104 | + &[href] { |
| 105 | + color: var(--hxLink-color, inherit); |
| 106 | + |
| 107 | + &:hover { |
| 108 | + color: var(--hxLink-color--hover, @cyan-500); |
108 | 109 |
|
109 | | - #hxIconWrapper { |
110 | | - > hx-file-icon { |
111 | | - display: none; |
| 110 | + #hxIconWrapper { |
| 111 | + > hx-file-icon { |
| 112 | + display: none; |
| 113 | + } |
| 114 | + |
| 115 | + > hx-icon { |
| 116 | + display: inline-block; |
| 117 | + } |
112 | 118 | } |
113 | 119 |
|
114 | | - > hx-icon { |
115 | | - display: inline-block; |
| 120 | + #hxName { |
| 121 | + color: inherit; |
116 | 122 | } |
117 | | - } |
| 123 | + }//hovered with href |
118 | 124 |
|
119 | | - #hxName { |
120 | | - color: inherit; |
| 125 | + &:focus { |
| 126 | + box-shadow: var(--hxLink-boxShadow--focus, @focus-glow); |
| 127 | + outline: 0; |
121 | 128 | } |
122 | | - }//hovered with href |
123 | | - |
124 | | - &:focus { |
125 | | - border-color: @cyan-700; |
126 | | - box-shadow: @focus-glow; |
127 | | - outline: 0; |
128 | 129 | } |
129 | 130 | }//#hxLink |
130 | 131 |
|
|
143 | 144 | } |
144 | 145 |
|
145 | 146 | :host([invalid]) { |
146 | | - #hxFileTile { |
147 | | - border-color: @red-900; |
| 147 | + #hxIconWrapper { |
| 148 | + color: var(--hxIcon-color, @gray-750); |
148 | 149 | } |
149 | 150 |
|
150 | | - #hxIconWrapper, |
151 | 151 | #hxName { |
152 | | - color: @gray-750; |
| 152 | + color: var(--hxName-color, @gray-750); |
153 | 153 | } |
154 | 154 |
|
155 | 155 | #hxState--downloadable { |
|
161 | 161 | } |
162 | 162 | } |
163 | 163 |
|
| 164 | +// TODO: hook for progress bar fill color |
164 | 165 | :host([progress]) { |
165 | | - #hxLink { |
166 | | - color: @gray-600; |
| 166 | + #hxDismiss { |
| 167 | + color: var(--hxDismiss-color, @gray-900); |
| 168 | + } |
| 169 | + |
| 170 | + #hxIconWrapper { |
| 171 | + color: var(--hxIcon-color, @gray-750); |
167 | 172 | } |
168 | 173 |
|
169 | | - #hxIconWrapper, |
170 | 174 | #hxName { |
171 | | - color: @gray-750; |
| 175 | + color: var(--hxName-color, @gray-750); |
172 | 176 | } |
173 | 177 |
|
174 | 178 | #hxState--downloadable { |
|
0 commit comments