|
7 | 7 |
|
8 | 8 | /* Icon placeholder in editor */ |
9 | 9 | .func-icon { |
10 | | - display: inline-flex; |
11 | | - align-items: center; |
12 | | - justify-content: center; |
| 10 | + display: inline; |
13 | 11 | vertical-align: middle; |
14 | 12 | } |
15 | 13 |
|
|
18 | 16 | height: 1em; |
19 | 17 | fill: currentColor; |
20 | 18 | vertical-align: -0.125em; |
| 19 | + display: inline-block; |
21 | 20 | } |
22 | 21 |
|
23 | 22 | /* Popover styles */ |
24 | 23 | .func-svg-icon-popover { |
25 | 24 | z-index: 100001; |
26 | 25 | } |
27 | 26 |
|
28 | | -.func-svg-icon-picker { |
29 | | - font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; |
30 | | -} |
31 | | - |
32 | | -/* Icon grid */ |
33 | | -.func-svg-icon-grid { |
34 | | - scrollbar-width: thin; |
35 | | - scrollbar-color: #c3c4c7 transparent; |
36 | | -} |
37 | | - |
38 | | -.func-svg-icon-grid::-webkit-scrollbar { |
39 | | - width: 6px; |
40 | | -} |
41 | | - |
42 | | -.func-svg-icon-grid::-webkit-scrollbar-track { |
43 | | - background: transparent; |
| 27 | +.func-svg-icon-popover .components-popover__content { |
| 28 | + padding: 0; |
44 | 29 | } |
45 | 30 |
|
46 | | -.func-svg-icon-grid::-webkit-scrollbar-thumb { |
47 | | - background-color: #c3c4c7; |
48 | | - border-radius: 3px; |
| 31 | +.func-svg-icon-picker { |
| 32 | + padding: 12px; |
| 33 | + min-width: 280px; |
| 34 | + max-width: 340px; |
49 | 35 | } |
50 | 36 |
|
51 | | -/* Icon button in grid */ |
52 | | -.func-svg-icon-button svg { |
53 | | - width: 20px; |
54 | | - height: 20px; |
55 | | - fill: currentColor; |
56 | | - color: #1e1e1e; |
| 37 | +.func-icon-search { |
| 38 | + margin-bottom: 12px !important; |
57 | 39 | } |
58 | 40 |
|
59 | | -.func-svg-icon-button:focus { |
60 | | - outline: 2px solid #007cba; |
61 | | - outline-offset: -2px; |
62 | | - box-shadow: none; |
| 41 | +.func-icon-search input { |
| 42 | + width: 100%; |
63 | 43 | } |
64 | 44 |
|
65 | | -/* Admin icon management styles */ |
66 | | -.func-svg-icons-admin { |
67 | | - max-width: 800px; |
| 45 | +/* Icon grid in popover */ |
| 46 | +.func-icon-grid { |
| 47 | + display: grid; |
| 48 | + grid-template-columns: repeat(6, 1fr); |
| 49 | + gap: 6px; |
| 50 | + max-height: 240px; |
| 51 | + overflow-y: auto; |
| 52 | + padding: 4px; |
68 | 53 | } |
69 | 54 |
|
70 | | -.func-svg-icons-list { |
71 | | - margin-top: 20px; |
| 55 | +.func-icon-grid::-webkit-scrollbar { |
| 56 | + width: 6px; |
72 | 57 | } |
73 | 58 |
|
74 | | -.func-svg-icon-item { |
75 | | - display: flex; |
76 | | - align-items: center; |
77 | | - gap: 16px; |
78 | | - padding: 12px 16px; |
79 | | - background: #fff; |
80 | | - border: 1px solid #c3c4c7; |
81 | | - border-radius: 4px; |
82 | | - margin-bottom: 8px; |
| 59 | +.func-icon-grid::-webkit-scrollbar-track { |
| 60 | + background: #f0f0f0; |
| 61 | + border-radius: 3px; |
83 | 62 | } |
84 | 63 |
|
85 | | -.func-svg-icon-item:hover { |
86 | | - border-color: #2271b1; |
| 64 | +.func-icon-grid::-webkit-scrollbar-thumb { |
| 65 | + background: #c0c0c0; |
| 66 | + border-radius: 3px; |
87 | 67 | } |
88 | 68 |
|
89 | | -.func-svg-icon-preview { |
90 | | - width: 32px; |
91 | | - height: 32px; |
| 69 | +/* Icon button in grid */ |
| 70 | +.func-icon-btn { |
92 | 71 | display: flex; |
93 | 72 | align-items: center; |
94 | 73 | justify-content: center; |
95 | | - background: #f6f7f7; |
| 74 | + width: 40px; |
| 75 | + height: 40px; |
| 76 | + padding: 8px; |
| 77 | + border: 1px solid #ddd; |
96 | 78 | border-radius: 4px; |
97 | | - flex-shrink: 0; |
98 | | -} |
99 | | - |
100 | | -.func-svg-icon-preview svg { |
101 | | - width: 24px; |
102 | | - height: 24px; |
103 | | - fill: currentColor; |
104 | | - color: #1d2327; |
105 | | -} |
106 | | - |
107 | | -.func-svg-icon-info { |
108 | | - flex: 1; |
109 | | - min-width: 0; |
110 | | -} |
111 | | - |
112 | | -.func-svg-icon-name { |
113 | | - font-weight: 600; |
114 | | - font-size: 14px; |
115 | | - color: #1d2327; |
116 | | - margin: 0 0 2px; |
117 | | -} |
118 | | - |
119 | | -.func-svg-icon-slug { |
120 | | - font-size: 12px; |
121 | | - color: #646970; |
122 | | - font-family: monospace; |
123 | | - margin: 0; |
124 | | -} |
125 | | - |
126 | | -.func-svg-icon-actions { |
127 | | - display: flex; |
128 | | - gap: 8px; |
129 | | - flex-shrink: 0; |
130 | | -} |
131 | | - |
132 | | -/* Add icon form */ |
133 | | -.func-svg-add-form { |
134 | | - background: #f6f7f7; |
135 | | - border: 1px solid #c3c4c7; |
136 | | - border-radius: 4px; |
137 | | - padding: 20px; |
138 | | - margin-bottom: 20px; |
139 | | -} |
140 | | - |
141 | | -.func-svg-add-form h3 { |
142 | | - margin-top: 0; |
143 | | - margin-bottom: 16px; |
144 | | -} |
145 | | - |
146 | | -.func-svg-form-row { |
147 | | - margin-bottom: 16px; |
148 | | -} |
149 | | - |
150 | | -.func-svg-form-row:last-child { |
151 | | - margin-bottom: 0; |
152 | | -} |
153 | | - |
154 | | -.func-svg-form-row label { |
155 | | - display: block; |
156 | | - font-weight: 600; |
157 | | - margin-bottom: 6px; |
158 | | - font-size: 13px; |
159 | | -} |
160 | | - |
161 | | -.func-svg-form-row input[type="text"], |
162 | | -.func-svg-form-row textarea { |
163 | | - width: 100%; |
164 | | - max-width: 400px; |
165 | | -} |
166 | | - |
167 | | -.func-svg-form-row textarea { |
168 | | - min-height: 150px; |
169 | | - font-family: monospace; |
170 | | - font-size: 12px; |
171 | | -} |
172 | | - |
173 | | -.func-svg-preview-area { |
174 | | - display: flex; |
175 | | - align-items: center; |
176 | | - gap: 16px; |
177 | | - padding: 16px; |
178 | 79 | background: #fff; |
179 | | - border: 1px solid #c3c4c7; |
180 | | - border-radius: 4px; |
181 | | - margin-top: 12px; |
182 | | -} |
183 | | - |
184 | | -.func-svg-preview-box { |
185 | | - width: 48px; |
186 | | - height: 48px; |
187 | | - display: flex; |
188 | | - align-items: center; |
189 | | - justify-content: center; |
190 | | - background: #f6f7f7; |
191 | | - border-radius: 4px; |
| 80 | + cursor: pointer; |
| 81 | + transition: all 0.15s ease; |
192 | 82 | } |
193 | 83 |
|
194 | | -.func-svg-preview-box svg { |
195 | | - max-width: 32px; |
196 | | - max-height: 32px; |
| 84 | +.func-icon-btn:hover { |
| 85 | + border-color: #007cba; |
| 86 | + background: #f0f6fc; |
| 87 | + transform: scale(1.05); |
197 | 88 | } |
198 | 89 |
|
199 | | -/* Empty state */ |
200 | | -.func-svg-empty { |
201 | | - text-align: center; |
202 | | - padding: 40px 20px; |
203 | | - background: #f6f7f7; |
204 | | - border: 1px dashed #c3c4c7; |
205 | | - border-radius: 4px; |
206 | | - color: #646970; |
| 90 | +.func-icon-btn:focus { |
| 91 | + outline: 2px solid #007cba; |
| 92 | + outline-offset: -2px; |
| 93 | + box-shadow: none; |
207 | 94 | } |
208 | 95 |
|
209 | | -.func-svg-empty .dashicons { |
210 | | - font-size: 48px; |
211 | | - width: 48px; |
212 | | - height: 48px; |
213 | | - color: #c3c4c7; |
214 | | - margin-bottom: 12px; |
| 96 | +.func-icon-btn svg { |
| 97 | + width: 22px; |
| 98 | + height: 22px; |
| 99 | + fill: currentColor; |
| 100 | + color: #1e1e1e; |
215 | 101 | } |
216 | 102 |
|
217 | | -.func-svg-empty p { |
218 | | - margin: 0; |
219 | | - font-size: 14px; |
| 103 | +/* Make SVGs inside icon buttons scale properly */ |
| 104 | +.func-icon-btn svg[viewBox] { |
| 105 | + width: 100%; |
| 106 | + height: 100%; |
| 107 | + max-width: 22px; |
| 108 | + max-height: 22px; |
220 | 109 | } |
0 commit comments