select-menu.css (2498B)
1 .select { 2 min-width: 0; 3 max-width: 100%; 4 display: block; 5 } 6 7 .select-trigger { 8 width: 100%; 9 min-width: 0; 10 max-width: 100%; 11 display: flex; 12 align-items: center; 13 justify-content: space-between; 14 gap: 0.75rem; 15 padding: 0.5rem 0.75rem; 16 border: 0; 17 border-bottom: 1pt solid var(--field-line); 18 border-radius: 0; 19 background: var(--surface); 20 color: inherit; 21 font: inherit; 22 font-size: 0.875rem; 23 line-height: 1.5; 24 text-align: left; 25 cursor: pointer; 26 } 27 28 .select-trigger:focus, 29 .select-trigger:focus-visible, 30 .select-trigger[aria-expanded="true"], 31 .select-trigger[aria-expanded="true"]:focus-visible { 32 outline: 0; 33 border-bottom-color: var(--accent); 34 } 35 36 .select-trigger:disabled { 37 color: var(--muted); 38 cursor: default; 39 opacity: 1; 40 } 41 42 .select-trigger svg { 43 flex: none; 44 width: 1.125rem; 45 height: 1.125rem; 46 } 47 48 .select-value { 49 min-width: 0; 50 overflow: hidden; 51 text-overflow: ellipsis; 52 white-space: nowrap; 53 } 54 55 .select-list { 56 position: fixed; 57 top: 0; 58 left: 0; 59 z-index: 120; 60 width: 10rem; 61 max-width: calc(100vw - 1rem); 62 max-height: min(18rem, 45vh); 63 padding: 0.25rem 0; 64 overflow-y: auto; 65 overscroll-behavior: contain; 66 background: var(--surface); 67 box-shadow: var(--shadow); 68 color: var(--text); 69 } 70 71 .select-list.is-measuring { 72 visibility: hidden; 73 top: 0; 74 right: auto; 75 bottom: auto; 76 left: 0; 77 width: auto; 78 max-height: none; 79 } 80 81 .select-option { 82 width: 100%; 83 min-height: 2.25rem; 84 display: flex; 85 align-items: center; 86 gap: 0; 87 padding: 0.5rem 0.75rem; 88 color: inherit; 89 font-size: 0.875rem; 90 line-height: 1.5; 91 cursor: pointer; 92 } 93 94 .select-option-mark { 95 width: 1.25rem; 96 height: 1.25rem; 97 flex: none; 98 display: flex; 99 align-items: center; 100 justify-content: center; 101 order: 2; 102 } 103 104 .select-option svg { 105 width: 1.125rem; 106 height: 1.125rem; 107 } 108 109 .select-option:not(.is-selected) .select-option-mark svg { 110 visibility: hidden; 111 } 112 113 .select-option-label { 114 min-width: 0; 115 flex: 1; 116 overflow: hidden; 117 text-overflow: ellipsis; 118 white-space: nowrap; 119 } 120 121 .select-option:hover { 122 background: var(--row-hover); 123 } 124 125 .select-option.is-active { 126 background: var(--row-hover); 127 } 128 129 .select-option.is-selected { 130 color: var(--accent-text); 131 } 132 133 @media (pointer: coarse) { 134 .select-trigger, 135 .select-option { 136 min-height: 2.75rem; 137 padding-block: 0.5rem; 138 touch-action: manipulation; 139 } 140 141 .select-trigger { 142 font-size: 1rem; 143 } 144 } 145 146 @media (min-width: 40em) { 147 .select.select-auto { 148 width: auto; 149 } 150 }