@@ -560,17 +560,15 @@ let user_gradient = $derived(gensyntax[$gradient_type](
560560 < button class = " global-actions" >
561561 < select tabindex= " -1" onchange= {globalAction}>
562562 < option disabled selected> Global Actions< / option>
563- < hr>
564- < option> Start new < / option>
565- < option> Import gradient< / option>
566- < option> Copy modern CSS < / option>
567- < option> Copy classic CSS < / option>
563+ < option>< svg aria- hidden= " true" viewBox= " 0 0 24 24" >< path fill= " currentColor" d= " M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z" / >< / svg> Start new < / option>
564+ < option>< svg aria- hidden= " true" viewBox= " 0 0 24 24" >< path fill= " currentColor" d= " M19 19H5V5h7V3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83l1.41 1.41L19 6.41V10h2V3h-7z" / >< / svg> Import gradient< / option>
565+ < option>< svg aria- hidden= " true" viewBox= " 0 0 24 24" >< path fill= " currentColor" d= " M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z" / >< / svg> Copy modern CSS < / option>
566+ < option>< svg aria- hidden= " true" viewBox= " 0 0 24 24" >< path fill= " currentColor" d= " M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z" / >< / svg> Copy classic CSS < / option>
568567 <!-- < option disabled> Reset all stops to auto< / option> -->
569- < hr>
570568 <!-- < option disabled> Toggle light & dark< / option> -->
571- < option> Tips & tricks< / option>
572- < option> Help & feedback< / option>
573- < option> GitHub< / option>
569+ < option>< svg aria - hidden = " true " viewBox = " 0 0 24 24 " >< path fill = " currentColor " d = " M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10s10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z " / >< / svg > Tips & tricks< / option>
570+ < option>< svg aria - hidden = " true " viewBox = " 0 0 24 24 " >< path fill = " currentColor " d = " M11 18h2v-2h-2v2zm1-16C6.48 2 2 6.48 2 12s4.48 10 10 10s10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8s8 3.59 8 8s-3.59 8-8 8zm0-14c-2.21 0-4 1.79-4 4h2c0-1.1.9-2 2-2s2 .9 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5c0-2.21-1.79-4-4-4z " / >< / svg > Help & feedback< / option>
571+ < option>< svg aria - hidden = " true " viewBox = " 0 0 24 24 " >< path fill = " currentColor " d = " M12 2A10 10 0 0 0 2 12c0 4.42 2.87 8.17 6.84 9.5c.5.08.66-.23.66-.5v-1.69c-2.77.6-3.36-1.34-3.36-1.34c-.46-1.16-1.11-1.47-1.11-1.47c-.91-.62.07-.6.07-.6c1 .07 1.53 1.03 1.53 1.03c.87 1.52 2.34 1.07 2.91.83c.09-.65.35-1.09.63-1.34c-2.22-.25-4.55-1.11-4.55-4.92c0-1.11.38-2 1.03-2.71c-.1-.25-.45-1.29.1-2.64c0 0 .84-.27 2.75 1.02c.79-.22 1.65-.33 2.5-.33c.85 0 1.71.11 2.5.33c1.91-1.29 2.75-1.02 2.75-1.02c.55 1.35.2 2.39.1 2.64c.65.71 1.03 1.6 1.03 2.71c0 3.82-2.34 4.66-4.57 4.91c.36.31.69.92.69 1.85V21c0 .27.16.59.67.5C19.14 20.16 22 16.42 22 12A10 10 0 0 0 12 2z " / >< / svg > GitHub< / option>
574572 < / select>
575573 < / button>
576574 < / div>
@@ -622,7 +620,7 @@ let user_gradient = $derived(gensyntax[$gradient_type](
622620 display: grid;
623621 border- radius: var (-- radius- 3 );
624622 box- shadow: var (-- shadow- 3 );
625- overflow: hidden ;
623+ overflow: clip ;
626624 }
627625
628626 @media (prefers - color - scheme : light ) {
@@ -743,7 +741,7 @@ let user_gradient = $derived(gensyntax[$gradient_type](
743741 display: grid;
744742 place- content: center;
745743 inline- size: 100cqi ;
746- overflow: hidden ;
744+ overflow: clip ;
747745 position: relative;
748746 }
749747
@@ -997,6 +995,161 @@ let user_gradient = $derived(gensyntax[$gradient_type](
997995 cursor: not- allowed;
998996 }
999997
998+ /* -----------------------------------------------
999+ * Customizable Select (base-select) Styles
1000+ * ----------------------------------------------- */
1001+ @supports (appearance : base - select ) {
1002+ : global (select ) {
1003+ appearance: base- select;
1004+ }
1005+
1006+ /* Style the button that activates the picker */
1007+ : global (select > button ) {
1008+ all: unset;
1009+ display: flex;
1010+ align- items: center;
1011+ gap: 0 .5ch ;
1012+ cursor: pointer;
1013+ white- space: nowrap;
1014+ }
1015+
1016+ /* Style the selected content display */
1017+ : global (select selectedcontent ) {
1018+ display: inline;
1019+ white- space: nowrap;
1020+ }
1021+
1022+ /* Hide the picker icon */
1023+ : global (select :: picker - icon ) {
1024+ display: none;
1025+ }
1026+
1027+ /* Action button selects: fit to parent and hide content so parent icon shows */
1028+ : global (.global - actions > select),
1029+ : global (.layer - actions > select),
1030+ : global (.stop - actions > select ) {
1031+ position: absolute;
1032+ inset: 0 ;
1033+ inline- size: 100 % ;
1034+ block- size: 100 % ;
1035+ opacity: 0 ;
1036+ }
1037+
1038+ /* Selects inside buttons should have no padding */
1039+ : global (button > select ) {
1040+ padding: 0 ;
1041+ }
1042+
1043+ : global (select:: picker (select)) {
1044+ appearance: base- select;
1045+ -- _picker- bg- light: #fff;
1046+ -- _picker- bg- dark: var (-- surface- 3 );
1047+ -- _picker- bg: var (-- _picker- bg- light);
1048+
1049+ background: var (-- _picker- bg);
1050+ border: 1px solid var (-- surface- 4 );
1051+ border- radius: var (-- radius- 2 );
1052+ box- shadow: var (-- shadow- 6 );
1053+ padding: var (-- size- 1 );
1054+ margin- block- start: var (-- size- 1 );
1055+
1056+ /* Transitions */
1057+ opacity: 0 ;
1058+ transform: translateY (- 8px ) scale (0.96 );
1059+ transition:
1060+ opacity 150ms var (-- ease- 3 ),
1061+ transform 150ms var (-- ease- 3 ),
1062+ overlay 150ms var (-- ease- 3 ) allow- discrete,
1063+ display 150ms var (-- ease- 3 ) allow- discrete;
1064+ }
1065+
1066+ : global (select: open:: picker (select)) {
1067+ opacity: 1 ;
1068+ transform: translateY (0 ) scale (1 );
1069+ }
1070+
1071+ @starting- style {
1072+ : global (select: open:: picker (select)) {
1073+ opacity: 0 ;
1074+ transform: translateY (- 8px ) scale (0.96 );
1075+ }
1076+ }
1077+
1078+ /* Hide disabled options in base-select mode */
1079+ : global (select option [disabled ]) {
1080+ display: none;
1081+ }
1082+
1083+ : global (select option ) {
1084+ display: flex;
1085+ align- items: center;
1086+ gap: var (-- size- 3 );
1087+ padding: var (-- size- 2 ) var (-- size- 2 );
1088+ border- radius: var (-- radius- 2 );
1089+ cursor: pointer;
1090+ transition:
1091+ background- color 100ms var (-- ease- 2 ),
1092+ color 100ms var (-- ease- 2 );
1093+ }
1094+
1095+ /* Style icons inside options */
1096+ : global (select option > svg ) {
1097+ inline- size: 1 .25em ;
1098+ block- size: 1 .25em ;
1099+ flex- shrink: 0 ;
1100+ }
1101+
1102+ : global (select option: not (: last- child)) {
1103+ margin- block- end: 1px ;
1104+ }
1105+
1106+ : global (select option : hover ) {
1107+ background- color: var (-- surface- 2 );
1108+ }
1109+
1110+ : global (select option: checked),
1111+ : global (select option : focus ) {
1112+ background- color: var (-- link);
1113+ color: white;
1114+ }
1115+
1116+ /* Position checkmark on inline-end */
1117+ : global (select option :: checkmark ) {
1118+ order: 2 ;
1119+ margin- inline- start: auto;
1120+ padding- inline- start: var (-- size- 2 );
1121+ }
1122+
1123+ : global (select optgroup ) {
1124+ padding- block: var (-- size- 1 );
1125+ }
1126+
1127+ : global (select optgroup : last - of - type ) {
1128+ padding- block- end: 0 ;
1129+ }
1130+
1131+ : global (select optgroup: not (: first- of - type)) {
1132+ border- block- start: 1px solid var (-- surface- 3 );
1133+ margin- block- start: var (-- size- 1 );
1134+ padding- block- start: var (-- size- 2 );
1135+ }
1136+
1137+ @media (prefers - color - scheme : dark ) {
1138+ : global (select:: picker (select)) {
1139+ -- _picker- bg: var (-- _picker- bg- dark);
1140+ border- color: var (-- surface- 4 );
1141+ }
1142+
1143+ : global (select option : hover ) {
1144+ background- color: var (-- surface- 4 );
1145+ }
1146+
1147+ : global (select optgroup: not (: first- of - type)) {
1148+ border- block- start- color: var (-- surface- 4 );
1149+ }
1150+ }
1151+ }
1152+
10001153 : global (.sr - only ) {
10011154 inline- size: 0 ;
10021155 block- size: 0 ;
@@ -1062,7 +1215,7 @@ let user_gradient = $derived(gensyntax[$gradient_type](
10621215 .global - actions {
10631216 position: relative;
10641217 inline- size: var (-- size- 7 );
1065- overflow: hidden ;
1218+ overflow: clip ;
10661219 border- radius: var (-- radius- round);
10671220 padding- inline: 0 ;
10681221 aspect- ratio: 1 ;
@@ -1078,11 +1231,8 @@ let user_gradient = $derived(gensyntax[$gradient_type](
10781231 -- _bg: transparent;
10791232 }
10801233
1081- .global - actions: not (: active,: focus) select {
1082- opacity: 0 ;
1083- }
1084-
10851234 .global - actions > select {
10861235 position: absolute;
1236+ inset: 0 ;
10871237 }
10881238< / style>
0 commit comments