@@ -189,41 +189,135 @@ h1 span {
189189}
190190
191191# custom-color-picker {
192+ display : none;
193+ }
194+
195+ .color-picker-wrap {
196+ position : relative;
197+ display : inline-flex;
198+ align-items : center;
199+ }
200+
201+ .color-picker-trigger {
202+ background : conic-gradient (red, yellow, lime, aqua, blue, magenta, red);
203+ cursor : pointer;
192204 width : 28px ;
193205 height : 28px ;
194206 border-radius : 50% ;
195- padding : 0 ;
196- border : none;
197- overflow : hidden;
198- appearance : none;
199- -webkit-appearance : none;
200- cursor : pointer;
201- background : conic-gradient (red, yellow, lime, aqua, blue, magenta, red);
202- transition : transform 0.15s ;
207+ border : 2px solid transparent;
208+ transition : transform 0.15s , border-color 0.15s ;
209+ flex-shrink : 0 ;
203210}
204211
205- # custom- color-picker:: -webkit-color-swatch-wrapper {
206- padding : 0 ;
212+ . color-picker-trigger : hover {
213+ transform : scale ( 1.15 ) ;
207214}
208215
209- # custom-color-picker ::-webkit-color-swatch {
210- border : none;
211- border-radius : 50% ;
212- background : transparent;
216+ .color-picker-trigger .active {
217+ border-color : # fff ;
218+ }
219+
220+ .color-picker-panel {
221+ display : none;
222+ position : absolute;
223+ top : calc (100% + 12px );
224+ left : 50% ;
225+ transform : translateX (-50% );
226+ width : 240px ;
227+ background : var (--surface2 );
228+ border : 1px solid var (--border );
229+ border-radius : 10px ;
230+ padding : 16px ;
231+ z-index : 100 ;
232+ box-shadow : 0 8px 32px rgba (0 , 0 , 0 , 0.4 );
233+ flex-direction : column;
234+ gap : 12px ;
213235}
214236
215- # custom-color-picker ::-moz-color-swatch {
237+ .color-picker-panel .open {
238+ display : flex;
239+ }
240+
241+ .cp-preview-row {
242+ display : flex;
243+ align-items : center;
244+ gap : 10px ;
245+ }
246+
247+ .cp-swatch {
248+ width : 32px ;
249+ height : 32px ;
250+ border-radius : 6px ;
251+ border : 1px solid var (--border );
252+ flex-shrink : 0 ;
253+ background : # 58a6ff ;
254+ }
255+
256+ .cp-hex-input {
257+ flex : 1 ;
258+ background : var (--surface );
259+ border : 1px solid var (--border );
260+ color : var (--fg );
261+ font-family : 'JetBrains Mono' , monospace;
262+ font-size : 13px ;
263+ padding : 6px 10px ;
264+ border-radius : 6px ;
265+ outline : none;
266+ transition : border-color 0.2s ;
267+ }
268+
269+ .cp-hex-input : focus {
270+ border-color : var (--blue );
271+ }
272+
273+ .cp-sliders {
274+ display : flex;
275+ flex-direction : column;
276+ gap : 8px ;
277+ }
278+
279+ .cp-label {
280+ font-family : 'JetBrains Mono' , monospace;
281+ font-size : 10px ;
282+ font-weight : 500 ;
283+ text-transform : uppercase;
284+ letter-spacing : 0.08em ;
285+ color : var (--fg3 );
286+ }
287+
288+ .cp-range {
289+ width : 100% ;
290+ height : 6px ;
291+ border-radius : 3px ;
292+ outline : none;
216293 border : none;
294+ cursor : pointer;
295+ appearance : none;
296+ -webkit-appearance : none;
297+ }
298+
299+ .cp-range ::-webkit-slider-thumb {
300+ -webkit-appearance : none;
301+ width : 14px ;
302+ height : 14px ;
217303 border-radius : 50% ;
218- background : transparent;
304+ background : # fff ;
305+ border : 2px solid var (--border );
306+ cursor : pointer;
307+ box-shadow : 0 1px 4px rgba (0 , 0 , 0 , 0.4 );
219308}
220309
221- # custom-color-picker : hover {
222- transform : scale (1.15 );
310+ .cp-range ::-moz-range-thumb {
311+ width : 14px ;
312+ height : 14px ;
313+ border-radius : 50% ;
314+ background : # fff ;
315+ border : 2px solid var (--border );
316+ cursor : pointer;
223317}
224318
225- # custom-color-picker . active {
226- border-color : # fff ;
319+ . cp-hue {
320+ background : linear-gradient (to right , # f00 , # ff0 , # 0f0 , # 0ff , # 00f , # f0f , # f00 ) ;
227321}
228322
229323.theme-dot [data-theme = "blue" ] {
@@ -726,7 +820,7 @@ h1 span {
726820.platform-spacer {
727821 width : 100% ;
728822 height : 77px ;
729- background : # 0d1117 ;
823+ background : transparent ;
730824 flex-shrink : 0 ;
731825 position : relative;
732826 z-index : 15 ;
0 commit comments