Test sheet · 164 specimens · 13 sections

Select styling specimens

Every way CSS can restyle a <select>, one technique per card, drawn by whichever browser opens this page. Each card prints the exact CSS it applies. Cards tagged open to see or similar need that interaction before the screenshot.

This browser

Feature checks need JavaScript
User agent
–
Browser brands
–
Platform
–
Viewport
–
Screen
–
Page colour scheme
–
Pointer
–
Preferences
–
Loaded (UTC)
–
    Page theme

    Native rendering

    No author CSS. The reference for everything below.

    Show only this sectionShow all sections
    A01

    Default dropdown

    <select>
      <option>Cherry</option>
      <option>Mango</option>
      <option selected>Banana</option>
      …
    </select>
    A02

    optgroup

    open to see
    <optgroup label="Tropical fruit">
      <option>Mango</option> …
    </optgroup>
    A03

    hr separators

    open to see<hr> inside <select>
    <option>Banana</option>
    <hr>
    <option>Papaya</option>
    A04

    disabled

    <select disabled>
    A05

    Listbox: size="4"

    <select size="4">
    A06

    Listbox: multiple

    <select multiple>

    Two options are selected.

    A07

    multiple size="1"

    <select multiple size="1">

    A multi-select popup where the browser has one. A one-row listbox elsewhere.

    A08

    Listbox with groups

    <select size="9">
      <optgroup label="Stone fruit">
        <option disabled>Apricot</option>
    A09

    Long option

    <option>Dragon fruit (white-fleshed pitahaya)</option>

    The width follows the widest option, not the selected one.

    A10

    Placeholder option

    <option value="" disabled selected hidden>
      Choose a fruit…
    </option>
    A11

    Beside an input and a button

    <input> <select> <button>

    Default heights, fonts and baselines side by side.

    The appearance property

    The switch between the platform control and a box that CSS draws.

    Show only this sectionShow all sections
    B01

    appearance: auto

    select {
      -webkit-appearance: auto;
      appearance: auto;
    }
    B02

    appearance: none

    select {
      -webkit-appearance: none;
      -moz-appearance: none;
      appearance: none;
    }

    The arrow goes with the native look. Section E puts one back.

    B03

    appearance: menulist

    select {
      -webkit-appearance: menulist;
      appearance: menulist;
    }
    B04

    appearance: menulist-button

    appearance: menulist-button
    select {
      -webkit-appearance: menulist-button;
      appearance: menulist-button;
    }
    B05

    appearance: textfield

    select {
      -webkit-appearance: textfield;
      appearance: textfield;
    }
    B06

    appearance: button

    select {
      -webkit-appearance: button;
      appearance: button;
    }
    B07

    appearance: none on a listbox

    select {
      -webkit-appearance: none;
      -moz-appearance: none;
      appearance: none;
    }
    B08

    appearance: none when disabled

    select {
      -webkit-appearance: none;
      -moz-appearance: none;
      appearance: none;
    }
    B09

    all: unset

    select {
      all: unset;
    }

    Removes the UA stylesheet rules as well as the native look.

    Box properties

    One property per card with appearance left alone. Shows which properties make an browser drop its native look.

    Show only this sectionShow all sections
    C01

    color

    select {
      color: #d6336c;
    }
    C02

    background-color

    select {
      background-color: #ffe066;
    }
    C03

    background-image

    select {
      background-image: linear-gradient(#ffffff, #b9c6d6);
    }
    C04

    border

    select {
      border: 2px solid #d6336c;
    }
    C05

    border-radius

    select {
      border-radius: 999px;
    }
    C06

    border with border-radius

    select {
      border: 2px solid #1d2733;
      border-radius: 12px;
    }
    C07

    border: 0

    select {
      border: 0;
    }
    C08

    background: none

    select {
      background: none;
    }
    C09

    padding

    select {
      padding: 12px 24px;
    }
    C10

    height

    select {
      height: 56px;
    }
    C11

    line-height

    select {
      line-height: 3;
    }
    C12

    width: 100%

    select {
      width: 100%;
    }
    C13

    Narrow fixed width

    select {
      width: 7em;
    }

    The selected text is longer than the box.

    C14

    box-shadow

    select {
      box-shadow: 4px 4px 0 #d6336c;
    }
    C15

    outline

    select {
      outline: 3px dashed #2f6fed;
      outline-offset: 3px;
    }
    C16

    opacity

    select {
      opacity: .4;
    }
    C17

    filter

    select {
      filter: invert(1) hue-rotate(180deg);
    }

    An old way to fake a dark control.

    Font and text

    A select ignores its parent font and colour unless told to inherit them.

    Show only this sectionShow all sections
    D01

    Inheritance

    Parent text
    .parent {
      font: italic 20px Georgia, serif;
      color: #d6336c;
    }
    select.b {
      font: inherit;
      color: inherit;
    }

    First control: the UA font and colour. Second: inherited from the parent.

    D02

    font-family

    select {
      font-family: Georgia, "Times New Roman", serif;
    }
    D03

    font-size

    .s { font-size: 11px; }
    .m { font-size: 16px; }
    .l { font-size: 28px; }
    D04

    font-weight

    select {
      font-weight: 700;
    }
    D05

    font-style

    select {
      font-style: italic;
    }
    D06

    font-variant

    select {
      font-variant: small-caps;
    }
    D07

    letter-spacing

    select {
      letter-spacing: .25em;
    }
    D08

    text-transform

    select {
      text-transform: uppercase;
    }
    D09

    text-decoration

    select {
      text-decoration: underline wavy #d6336c;
    }
    D10

    text-shadow

    select {
      text-shadow: 2px 2px 0 #d6336c;
    }
    D11

    text-align: center

    select {
      width: 14em;
      text-align: center;
    }
    D12

    text-align and text-align-last

    text-align-last

    select { width: 14em; }
    .a { text-align: right; }
    .b { text-align-last: right; }
    D13

    text-indent

    select {
      text-indent: 2em;
    }
    D14

    direction: rtl

    select {
      direction: rtl;
    }

    The arrow should move to the left.

    D15

    white-space: normal

    select {
      width: 9em;
      white-space: normal;
    }

    Tests whether long selected text wraps.

    D16

    text-overflow

    select {
      width: 9em;
      text-overflow: ellipsis;
    }
    D17

    writing-mode: vertical-rl

    select {
      writing-mode: vertical-rl;
    }
    D18

    writing-mode with upright text

    select {
      writing-mode: vertical-lr;
      text-orientation: upright;
    }

    Replacement arrows

    appearance: none takes the arrow away. Each card puts one back a different way.

    Show only this sectionShow all sections
    E01

    Shared base: no arrow

    select {
      -webkit-appearance: none;
      -moz-appearance: none;
      appearance: none;
      margin: 0;
      padding: 9px 40px 9px 12px;
      font: 16px/1.25 system-ui, sans-serif;
      color: #1d2733;
      background-color: #fff;
      border: 1px solid #8794a3;
      border-radius: 6px;
    }

    E02 to E12 all add to this rule.

    E02

    SVG data URI background

    /* added to E01 */
    select {
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%231d2733' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='m3 6 5 5 5-5'/%3E%3C/svg%3E");
      background-repeat: no-repeat;
      background-position: right 12px center;
      background-size: 16px 16px;
    }
    E03

    Two gradient triangles

    /* added to E01 */
    select {
      background-image:
        linear-gradient(45deg, transparent 50%, #1d2733 50%),
        linear-gradient(135deg, #1d2733 50%, transparent 50%);
      background-position:
        calc(100% - 19px) 50%,
        calc(100% - 13px) 50%;
      background-size: 6px 6px;
      background-repeat: no-repeat;
    }

    No image at all, so the arrow can use currentColor.

    E04

    Wrapper with a border triangle

    <span class="wrap">
      <select>…</select>
    </span>/* added to E01 */
    .wrap {
      position: relative;
      display: inline-block;
    }
    .wrap::after {
      content: "";
      position: absolute;
      right: 14px;
      top: 50%;
      margin-top: -3px;
      border: 6px solid transparent;
      border-top-color: #1d2733;
      border-bottom: 0;
      pointer-events: none;
    }
    E05

    Wrapper with a text glyph

    /* added to E01 */
    .wrap {
      position: relative;
      display: inline-block;
    }
    .wrap::after {
      content: "\25BE";
      position: absolute;
      right: 14px;
      top: 50%;
      transform: translateY(-50%);
      font-size: 18px;
      line-height: 1;
      color: #1d2733;
      pointer-events: none;
    }

    U+25BE. The glyph comes from whichever font the platform picks.

    E06

    Wrapper with a rotated border

    /* added to E01 */
    .wrap {
      position: relative;
      display: inline-block;
    }
    .wrap::after {
      content: "";
      position: absolute;
      right: 16px;
      top: 50%;
      width: 7px;
      height: 7px;
      margin-top: -7px;
      border-right: 2px solid #1d2733;
      border-bottom: 2px solid #1d2733;
      transform: rotate(45deg);
      pointer-events: none;
    }
    E07

    Grid wrapper with clip-path

    /* added to E01 */
    .wrap {
      display: inline-grid;
      grid-template-areas: "select";
      align-items: center;
    }
    .wrap select,
    .wrap::after {
      grid-area: select;
    }
    .wrap::after {
      content: "";
      justify-self: end;
      width: 12px;
      height: 7px;
      margin-right: 14px;
      background-color: #1d2733;
      clip-path: polygon(100% 0%, 0 0%, 50% 100%);
      pointer-events: none;
    }
    E08

    Masked icon in currentColor

    mask-image
    /* added to E01 */
    .wrap {
      position: relative;
      display: inline-block;
      color: #d6336c;
    }
    .wrap select {
      color: inherit;
      border-color: currentColor;
    }
    .wrap::after {
      content: "";
      position: absolute;
      right: 12px;
      top: 50%;
      width: 16px;
      height: 16px;
      margin-top: -8px;
      background-color: currentColor;
      -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='m3 6 5 5 5-5'/%3E%3C/svg%3E") center / contain no-repeat;
      mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='m3 6 5 5 5-5'/%3E%3C/svg%3E") center / contain no-repeat;
      pointer-events: none;
    }

    Arrow, text and border all follow one colour.

    E09

    Arrow in its own block

    /* added to E01 */
    select {
      padding-right: 54px;
      background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='m3 6 5 5 5-5'/%3E%3C/svg%3E"),
        linear-gradient(#2f6fed, #2f6fed);
      background-repeat: no-repeat;
      background-position: right 13px center, right center;
      background-size: 16px 16px, 42px 100%;
    }
    E10

    Up and down chevrons

    /* added to E01 */
    select {
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%231d2733' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round' d='m4.5 6 3.5-3.5L11.5 6M4.5 10 8 13.5 11.5 10'/%3E%3C/svg%3E");
      background-repeat: no-repeat;
      background-position: right 12px center;
      background-size: 16px 16px;
    }
    E11

    Arrow on the left

    /* added to E01 */
    select {
      padding: 9px 12px 9px 40px;
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%231d2733' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='m3 6 5 5 5-5'/%3E%3C/svg%3E");
      background-repeat: no-repeat;
      background-position: left 12px center;
      background-size: 16px 16px;
    }
    E12

    Legacy arrow removal

    ::-ms-expand
    /* added to E01 */
    /* IE 10 and 11, EdgeHTML */
    select::-ms-expand {
      display: none;
    }
    /* Firefox before 35 */
    select {
      text-indent: 0.01px;
      text-overflow: "";
    }

    No effect in current browsers. Kept for screenshots of old ones.

    Complete designs

    Finished looks built from the techniques above, each with its full CSS.

    Show only this sectionShow all sections
    F01

    Outlined

    select {
      -webkit-appearance: none;
      appearance: none;
      padding: 6px 38px 6px 12px;
      font: 16px/1.5 system-ui, sans-serif;
      color: #1d2733;
      background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%235c6b7a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='m3 6 5 5 5-5'/%3E%3C/svg%3E") no-repeat right 11px center / 16px 16px;
      border: 1px solid #b6c0cb;
      border-radius: 6px;
    }
    select:hover {
      border-color: #5c6b7a;
    }
    select:focus-visible {
      outline: none;
      border-color: #2f6fed;
      box-shadow: 0 0 0 4px rgba(47, 111, 237, .25);
    }
    F02

    Filled

    select {
      -webkit-appearance: none;
      appearance: none;
      min-width: 13em;
      padding: 14px 40px 12px 14px;
      font: 16px/1.5 system-ui, sans-serif;
      color: #1d2733;
      background: #dfe5ec url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%231d2733' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='m3 6 5 5 5-5'/%3E%3C/svg%3E") no-repeat right 12px center / 16px 16px;
      border: 0;
      border-bottom: 2px solid #5c6b7a;
      border-radius: 6px 6px 0 0;
    }
    select:focus-visible {
      outline: none;
      background-color: #d3e0f8;
      border-bottom-color: #2f6fed;
    }
    F03

    Underline

    select {
      -webkit-appearance: none;
      appearance: none;
      min-width: 12em;
      padding: 6px 28px 6px 0;
      font: inherit;
      color: inherit;
      background-color: transparent;
      background-image:
        linear-gradient(45deg, transparent 50%, currentColor 50%),
        linear-gradient(135deg, currentColor 50%, transparent 50%);
      background-position: calc(100% - 11px) 50%, calc(100% - 5px) 50%;
      background-size: 6px 6px;
      background-repeat: no-repeat;
      border: 0;
      border-bottom: 2px solid currentColor;
      border-radius: 0;
    }

    Font and colour come from the parent, so it follows the page theme.

    F04

    Pill

    select {
      -webkit-appearance: none;
      appearance: none;
      padding: 8px 36px 8px 16px;
      font: 600 14px/1.2 system-ui, sans-serif;
      color: #fff;
      background: #2f6fed url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='m3 6 5 5 5-5'/%3E%3C/svg%3E") no-repeat right 12px center / 14px 14px;
      border: 0;
      border-radius: 999px;
    }
    option {
      color: #1d2733;
      background-color: #fff;
    }

    The option rule stops white text landing on a white popup.

    F05

    Inline in a sentence

    Sort fruit by and show per page.
    select {
      -webkit-appearance: none;
      appearance: none;
      padding: 0 1.1em 0 0;
      font: inherit;
      color: LinkText;
      background-color: transparent;
      background-image:
        linear-gradient(45deg, transparent 50%, currentColor 50%),
        linear-gradient(135deg, currentColor 50%, transparent 50%);
      background-position: calc(100% - 5px) 55%, 100% 55%;
      background-size: 5px 5px;
      background-repeat: no-repeat;
      border: 0;
      border-bottom: 1px dashed currentColor;
      border-radius: 0;
      cursor: pointer;
    }
    F06

    Dark

    select {
      -webkit-appearance: none;
      appearance: none;
      color-scheme: dark;
      padding: 8px 40px 8px 14px;
      font: 16px/1.5 system-ui, sans-serif;
      color: #f1f4f7;
      background: #1d2733 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23ffe066' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='m3 6 5 5 5-5'/%3E%3C/svg%3E") no-repeat right 12px center / 16px 16px;
      border: 1px solid #45556a;
      border-radius: 8px;
    }
    F07

    Gradient button

    select {
      -webkit-appearance: none;
      appearance: none;
      padding: 12px 44px 12px 18px;
      font: 600 16px/1.25 system-ui, sans-serif;
      color: #fff;
      background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='m3 6 5 5 5-5'/%3E%3C/svg%3E"),
        linear-gradient(135deg, #2f6fed, #7048e8);
      background-repeat: no-repeat;
      background-position: right 14px center, 0 0;
      background-size: 16px 16px, 100% 100%;
      border: 0;
      border-radius: 12px;
      box-shadow: 0 6px 16px rgba(47, 111, 237, .35);
    }
    option {
      color: #1d2733;
      background-color: #fff;
    }
    F08

    Hard shadow

    select {
      -webkit-appearance: none;
      appearance: none;
      padding: 8px 40px 8px 12px;
      font: 700 16px/1.25 system-ui, sans-serif;
      color: #1d2733;
      background: #ffe066 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%231d2733' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='m3 6 5 5 5-5'/%3E%3C/svg%3E") no-repeat right 12px center / 16px 16px;
      border: 2px solid #1d2733;
      border-radius: 0;
      box-shadow: 4px 4px 0 #1d2733;
    }
    F09

    Three sizes from one rule

    select {
      -webkit-appearance: none;
      appearance: none;
      padding: .5em 2.5em .5em .75em;
      font-family: system-ui, sans-serif;
      line-height: 1.25;
      color: #1d2733;
      background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%231d2733' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='m3 6 5 5 5-5'/%3E%3C/svg%3E") no-repeat right .75em center / 1em 1em;
      border: 1px solid #8794a3;
      border-radius: .375em;
    }
    .sm { font-size: 13px; }
    .md { font-size: 16px; }
    .lg { font-size: 20px; }

    Every length is in em, so font-size scales the whole control.

    F10

    Leading icon

    select {
      -webkit-appearance: none;
      appearance: none;
      padding: 7px 38px;
      font: 16px/1.5 system-ui, sans-serif;
      color: #1d2733;
      background-color: #fff;
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cg fill='none' stroke='%235c6b7a' stroke-width='1.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='8' cy='8' r='6.25'/%3E%3Cpath d='M1.75 8h12.5M8 1.75c2.4 2.2 2.4 10.3 0 12.5M8 1.75c-2.4 2.2-2.4 10.3 0 12.5'/%3E%3C/g%3E%3C/svg%3E"), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%235c6b7a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='m3 6 5 5 5-5'/%3E%3C/svg%3E");
      background-repeat: no-repeat;
      background-position: left 12px center, right 11px center;
      background-size: 16px 16px;
      border: 1px solid #8794a3;
      border-radius: 6px;
    }
    F11

    Floating label

    <span class="field">
      <label for="fruit">Favourite fruit</label>
      <select id="fruit">…</select>
    </span>.field {
      position: relative;
      display: inline-block;
    }
    .field label {
      position: absolute;
      left: 13px;
      top: 8px;
      font: 600 11px/1 system-ui, sans-serif;
      letter-spacing: .05em;
      text-transform: uppercase;
      color: #5c6b7a;
      pointer-events: none;
    }
    .field select {
      -webkit-appearance: none;
      appearance: none;
      min-width: 14em;
      padding: 24px 40px 8px 12px;
      font: 16px/1.25 system-ui, sans-serif;
      color: #1d2733;
      background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%231d2733' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='m3 6 5 5 5-5'/%3E%3C/svg%3E") no-repeat right 12px center / 16px 16px;
      border: 1px solid #8794a3;
      border-radius: 8px;
    }
    F12

    Joined to a prefix

    Fruit
    <span class="group">
      <span class="addon">Fruit</span>
      <select>…</select>
    </span>.group {
      display: inline-flex;
    }
    .group .addon,
    .group select {
      margin: 0;
      padding: 8px 12px;
      font: 16px/1.5 system-ui, sans-serif;
      color: #1d2733;
      border: 1px solid #8794a3;
    }
    .group .addon {
      background-color: #dfe5ec;
      border-right: 0;
      border-radius: 6px 0 0 6px;
    }
    .group select {
      -webkit-appearance: none;
      appearance: none;
      padding-right: 38px;
      background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%231d2733' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='m3 6 5 5 5-5'/%3E%3C/svg%3E") no-repeat right 11px center / 16px 16px;
      border-radius: 0 6px 6px 0;
    }

    States

    Pseudo-classes on the select itself.

    Show only this sectionShow all sections
    G01

    Default focus ring

    focus to see
    /* no author CSS */

    No author CSS. Tab to the control or click it.

    G02

    :focus-visible outline

    focus to see
    forced
    select:focus-visible,
    select.force {
      outline: 3px solid #2f6fed;
      outline-offset: 2px;
    }

    The second control has the same rule forced on with a class, so the state shows without interaction.

    G03

    :focus ring from box-shadow

    focus to see
    forced
    select {
      padding: 6px 10px;
      color: #1d2733;
      background-color: #fff;
      border: 2px solid #8794a3;
      border-radius: 6px;
    }
    select:focus,
    select.force {
      outline: none;
      border-color: #2f6fed;
      box-shadow: 0 0 0 4px rgba(47, 111, 237, .3);
    }

    The second control has the same rule forced on with a class, so the state shows without interaction.

    G04

    :hover

    hover to see
    forced
    select {
      padding: 6px 10px;
      color: #1d2733;
      background-color: #fff;
      border: 2px solid #8794a3;
      border-radius: 6px;
    }
    select:hover,
    select.force {
      background-color: #ffe066;
      border-color: #1d2733;
    }

    The second control has the same rule forced on with a class, so the state shows without interaction.

    G05

    :disabled

    select:disabled {
      color: #5c6b7a;
      -webkit-text-fill-color: #5c6b7a;
      background-color: #dfe5ec;
      border: 1px dashed #8794a3;
      opacity: 1;
      cursor: not-allowed;
    }

    opacity and the fill colour undo the dimming some browsers add.

    G06

    Placeholder from :required:invalid

    <select required>
      <option value="" disabled selected hidden>
        Choose a fruit…
      </option>select:required:invalid {
      color: #8794a3;
    }
    option {
      color: FieldText;
    }
    G07

    Placeholder from :has()

    :has()
    <option value="">Choose a fruit…</option>select:has(option[value=""]:checked) {
      color: #8794a3;
      font-style: italic;
    }
    option {
      color: FieldText;
      font-style: normal;
    }
    G08

    :invalid and :valid

    select {
      padding: 6px 10px;
      color: #1d2733;
      background-color: #fff;
      border: 2px solid #8794a3;
      border-radius: 6px;
    }
    select:invalid {
      border-color: #e03131;
    }
    select:valid {
      border-color: #2f9e44;
    }

    Both are required. The first has no value yet.

    G09

    :user-invalid

    interact to see:user-invalid
    select:user-invalid {
      outline: 3px solid #e03131;
    }

    Pick a fruit, then pick the first option again.

    G10

    Colour from the chosen value

    :has()
    select {
      padding: 6px 10px;
      border: 2px solid #8794a3;
      border-radius: 6px;
    }
    select:has(option[value="stock"]:checked) {
      color: #14532d;
      background-color: #d3f9d8;
      border-color: #2f9e44;
    }
    select:has(option[value="low"]:checked) {
      color: #6b4400;
      background-color: #fff3bf;
      border-color: #f08c00;
    }
    select:has(option[value="out"]:checked) {
      color: #7d1a1a;
      background-color: #ffe3e3;
      border-color: #e03131;
    }
    option {
      color: #1d2733;
      background-color: #fff;
    }
    G11

    :open

    open to see:open
    select:open {
      background-color: #ffe066;
      outline: 3px solid #d6336c;
    }
    G12

    :autofill

    needs autofill:autofill
    select:autofill {
      box-shadow: 0 0 0 100px #fff3bf inset;
    }
    select:-webkit-autofill {
      -webkit-text-fill-color: #1d2733;
      box-shadow: 0 0 0 100px #fff3bf inset;
    }

    Shows only after the browser fills the field from a saved address.

    Options and groups

    Drawn as listboxes so the options are in the screenshot. The last three are dropdowns to open.

    Show only this sectionShow all sections
    H01

    option colours

    option {
      color: #d6336c;
      background-color: #fff3bf;
    }
    H02

    option:checked

    option:checked {
      color: #fff;
      background-color: #d6336c;
    }

    Many browsers paint their own selection colour over this. Click inside to compare the focused and unfocused selection.

    H03

    option:checked with a gradient

    option:checked {
      color: #fff;
      background: linear-gradient(#d6336c, #d6336c);
    }

    A gradient is an image, so the system highlight cannot replace it.

    H04

    option:checked with an inset shadow

    option:checked {
      color: #fff;
      box-shadow: 0 0 0 100px #d6336c inset;
    }
    H05

    option:hover

    hover to see
    option:hover {
      background-color: #ffe066;
    }
    H06

    option:disabled

    option:disabled {
      color: #e03131;
      font-style: italic;
      text-decoration: line-through;
    }
    H07

    option padding

    option {
      padding: 10px 16px;
    }
    H08

    option font

    option {
      font: italic 700 18px Georgia, serif;
    }
    H09

    optgroup

    optgroup {
      color: #2f6fed;
      background-color: #e7f0ff;
      font-style: normal;
      font-weight: 700;
    }
    optgroup option {
      padding-left: 24px;
      color: #1d2733;
      background-color: #fff;
      font-weight: 400;
    }
    H10

    Zebra rows

    option:nth-child(even) {
      color: #1d2733;
      background-color: #dfe5ec;
    }
    H11

    A class on each option

    <option class="cherry">Cherry</option>option.cherry {
      color: #c92a2a;
      border-left: 10px solid #e03131;
    }
    option.mango {
      color: #c2410c;
      border-left: 10px solid #f76707;
    }
    option.banana {
      color: #8a6100;
      border-left: 10px solid #f2b705;
    }
    H12

    option::before

    option::before {
      content: "○ ";
      color: #d6336c;
    }
    option:checked::before {
      content: "● ";
    }
    H13

    option text-align

    option {
      text-align: center;
    }
    H14

    option:default

    interact to see
    option:default {
      font-weight: 700;
      text-decoration: underline;
    }

    Matches the option carrying the selected attribute. Pick another row and the underline should stay on Banana.

    H15

    Options as cards

    option {
      margin: 4px;
      padding: 6px 10px;
      border: 1px solid #8794a3;
      border-radius: 8px;
    }
    H16

    Hidden options

    <option hidden>…</option>
    <option class="gone">…</option>option.gone {
      display: none;
    }

    Two rows should be missing. A row that names how it was hidden is a failure.

    H17

    Wrapping option text

    select {
      width: 11em;
    }
    option {
      white-space: normal;
    }
    H18

    option background-image

    option {
      padding-left: 26px;
      background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='5' fill='%23d6336c'/%3E%3C/svg%3E") no-repeat 8px center / 10px 10px;
    }
    H19

    Dropdown: popup takes the select colours

    open to see
    select {
      color: #ffe066;
      background-color: #1d2733;
    }
    H20

    Dropdown: option and optgroup colours

    open to see
    option {
      color: #d6336c;
      background-color: #fff3bf;
    }
    option:checked {
      color: #fff;
      background-color: #d6336c;
    }
    optgroup {
      color: #2f6fed;
      background-color: #e7f0ff;
    }
    H21

    Dropdown: option size

    open to see
    option {
      padding: 12px 16px;
      font-size: 24px;
    }

    Listbox container

    The box around the options when size or multiple is set.

    Show only this sectionShow all sections
    I01

    width and height

    select {
      width: 14em;
      height: 9.5em;
    }
    I02

    Box styling

    select {
      padding: 8px;
      color: #1d2733;
      background-color: #fff3bf;
      border: 2px solid #1d2733;
      border-radius: 12px;
    }
    I03

    scrollbar-color and scrollbar-width

    scrollbar-colorscrollbar-width
    select {
      scrollbar-width: thin;
      scrollbar-color: #d6336c #ffe066;
    }
    I04

    ::-webkit-scrollbar

    ::-webkit-scrollbar
    select::-webkit-scrollbar {
      width: 14px;
    }
    select::-webkit-scrollbar-track {
      background: #ffe066;
    }
    select::-webkit-scrollbar-thumb {
      background: #d6336c;
      border: 3px solid #ffe066;
      border-radius: 7px;
    }
    I05

    Hidden scrollbar

    select {
      scrollbar-width: none;
    }
    select::-webkit-scrollbar {
      display: none;
    }

    Twelve options in five rows. It should still scroll.

    I06

    field-sizing: content

    field-sizing: content
    select {
      field-sizing: content;
    }

    Where it works, the box grows to fit all twelve options.

    I07

    Options in a row

    select {
      width: 100%;
      height: auto;
      padding: 6px;
      overflow: hidden;
      border: 1px solid #8794a3;
      border-radius: 10px;
    }
    option {
      display: inline-block;
      margin: 2px;
      padding: 6px 12px;
      color: #1d2733;
      background-color: #dfe5ec;
      border-radius: 999px;
    }
    option:checked {
      color: #fff;
      background: linear-gradient(#2f6fed, #2f6fed);
    }

    inline-block options turn the listbox into chips in some browsers.

    I08

    direction: rtl

    select {
      direction: rtl;
    }

    The scrollbar should move to the left.

    I09

    writing-mode: vertical-rl

    select {
      writing-mode: vertical-rl;
    }

    Sizing and layout

    How a select takes its width, and how it sits beside other controls.

    Show only this sectionShow all sections
    J01

    field-sizing: content

    field-sizing: content
    select {
      field-sizing: content;
    }

    Same options in both. Where it works, each is as wide as its selected text.

    J02

    Flex item: min-width

    A
    B
    .row {
      display: flex;
      gap: 8px;
      width: 200px;
      margin-bottom: 8px;
      outline: 1px dashed #8794a3;
    }
    .row select {
      flex: 1;
    }
    .row.b select {
      min-width: 0;
    }

    The dashed box is 200px wide. Row A shows the default minimum; row B lets the select shrink.

    J03

    max-width: 100%

    .box {
      width: 160px;
      margin-bottom: 8px;
      outline: 1px dashed #8794a3;
    }
    .box.b select {
      max-width: 100%;
    }

    The dashed box is 160px wide.

    J04

    box-sizing

    select {
      width: 10em;
      padding: 10px;
      border: 2px solid #8794a3;
    }
    .content { box-sizing: content-box; }
    .border { box-sizing: border-box; }
    J05

    zoom and transform: scale

    zoom

    .z {
      zoom: 1.5;
    }
    .t {
      margin: 8px 0;
      transform: scale(1.5);
      transform-origin: 0 50%;
    }
    J06

    Matching an input and a button

    input,
    select,
    button {
      box-sizing: border-box;
      margin: 0;
      padding: 8px 12px;
      font: 16px/1.5 system-ui, sans-serif;
      border: 1px solid #8794a3;
      border-radius: 6px;
      vertical-align: middle;
    }
    .reset select {
      -webkit-appearance: none;
      appearance: none;
    }

    Same box rules on all three. The second row also removes the native look from the select.

    Colour schemes

    color-scheme, system colours and the preference media queries.

    Show only this sectionShow all sections
    K01

    color-scheme: light

    select {
      color-scheme: light;
    }
    K02

    color-scheme: dark

    select {
      color-scheme: dark;
    }
    K03

    color-scheme: light dark

    depends on OS setting
    select {
      color-scheme: light dark;
    }

    Follows the operating system, whatever this page is set to.

    K04

    color-scheme: dark on a listbox

    select {
      color-scheme: dark;
    }
    K05

    System colours

    SelectedItem system colour
    select {
      -webkit-appearance: none;
      appearance: none;
      padding: 6px 10px;
      color: FieldText;
      background-color: Field;
      border: 2px solid ButtonBorder;
      border-radius: 6px;
    }
    option:checked {
      color: SelectedItemText;
      background-color: SelectedItem;
    }
    K06

    light-dark()

    depends on OS settinglight-dark()
    select {
      -webkit-appearance: none;
      appearance: none;
      color-scheme: light dark;
      padding: 6px 10px;
      color: light-dark(#1d2733, #ffe066);
      background-color: light-dark(#fff3bf, #1d2733);
      border: 2px solid light-dark(#1d2733, #ffe066);
      border-radius: 6px;
    }
    K07

    accent-color

    accent-color
    select {
      accent-color: #d6336c;
    }

    Tests whether the accent reaches a select at all.

    K08

    prefers-color-scheme

    depends on OS setting
    select {
      -webkit-appearance: none;
      appearance: none;
      padding: 6px 10px;
      color: #1d2733;
      background-color: #fff;
      border: 2px solid #1d2733;
      border-radius: 6px;
    }
    @media (prefers-color-scheme: dark) {
      select {
        color: #ffe066;
        background-color: #1d2733;
        border-color: #ffe066;
      }
    }
    K09

    forced-colors

    depends on OS settingforced-color-adjust
    select {
      -webkit-appearance: none;
      appearance: none;
      padding: 6px 10px;
      color: #1d2733;
      background-color: #e7f0ff;
      border: 2px solid #2f6fed;
      border-radius: 6px;
    }
    select.keep {
      forced-color-adjust: none;
    }
    @media (forced-colors: active) {
      select.adapt {
        border-color: Highlight;
      }
    }

    Differs only in a forced colours mode such as Windows High Contrast. The second control keeps its author colours.

    K10

    prefers-contrast

    depends on OS setting
    select {
      padding: 6px 10px;
      border: 1px solid #b6c0cb;
      border-radius: 6px;
    }
    @media (prefers-contrast: more) {
      select {
        border: 3px solid #000;
      }
    }

    Touch and mobile

    Rules that only show a difference on phones and tablets.

    Show only this sectionShow all sections
    L01

    font-size under 16px

    tap to see
    .small { font-size: 13px; }
    .safe { font-size: 16px; }

    iOS Safari zooms the page when a control under 16px takes focus.

    L02

    44px touch target

    select {
      min-width: 44px;
      min-height: 44px;
    }
    L03

    iOS reset

    select {
      -webkit-appearance: none;
      appearance: none;
      padding: 10px 12px;
      font-size: 16px;
      color: #1d2733;
      background-color: #fff;
      border: 1px solid #8794a3;
      border-radius: 0;
    }
    L04

    Tap highlight

    tap to see
    .loud {
      -webkit-tap-highlight-color: rgba(214, 51, 108, .5);
    }
    .off {
      -webkit-tap-highlight-color: transparent;
    }
    L05

    pointer: coarse

    select {
      padding: 6px 10px;
      font: 16px/1.25 system-ui, sans-serif;
    }
    @media (pointer: coarse) {
      select {
        padding: 14px 16px;
        font-size: 18px;
      }
    }

    Larger on touch screens only.

    L06

    Full-width block

    select {
      display: block;
      width: 100%;
      min-height: 48px;
      font-size: 16px;
    }

    Customizable select

    appearance: base-select

    appearance: base-select hands the button, picker, options, arrow and checkmark to CSS. As of November 2026: Chrome and Edge 135, Safari 27, and Firefox behind a flag. Elsewhere these cards show the native fallback.

    Show only this sectionShow all sections
    M01

    Opt in the button only

    select {
      appearance: base-select;
    }

    The picker stays native.

    M02

    Opt in the button and the picker

    open to see::picker(select)
    select,
    ::picker(select) {
      appearance: base-select;
    }

    Nothing else is set: these are the browser's base styles.

    M03

    Styled button

    select,
    ::picker(select) {
      appearance: base-select;
    }
    
    select {
      min-width: 12em;
      padding: 9px 12px;
      font: 16px/1.25 system-ui, sans-serif;
      color: #1d2733;
      background-color: #fff;
      border: 1px solid #8794a3;
      border-radius: 8px;
    }
    select:hover {
      background-color: #dfe5ec;
    }
    select:focus-visible {
      outline: 3px solid #2f6fed;
      outline-offset: 2px;
    }
    M04

    ::picker-icon glyph and colour

    ::picker-icon
    select,
    ::picker(select) {
      appearance: base-select;
    }
    
    select::picker-icon {
      content: "▼";
      color: #d6336c;
      font-size: 12px;
    }
    M05

    ::picker-icon image, turning on :open

    open to see::picker-icon:open
    select,
    ::picker(select) {
      appearance: base-select;
    }
    
    select::picker-icon {
      content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23d6336c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='m3 6 5 5 5-5'/%3E%3C/svg%3E");
      width: 16px;
      height: 16px;
    }
    select:open::picker-icon {
      rotate: 180deg;
    }
    @media (prefers-reduced-motion: no-preference) {
      select::picker-icon {
        transition: rotate .2s;
      }
    }
    M06

    ::picker-icon removed

    ::picker-icon
    select,
    ::picker(select) {
      appearance: base-select;
    }
    
    select::picker-icon {
      display: none;
    }
    M07

    ::picker(select) box

    open to see::picker(select)
    select,
    ::picker(select) {
      appearance: base-select;
    }
    
    ::picker(select) {
      margin-block: 6px;
      padding: 6px;
      color: #1d2733;
      background-color: #fff3bf;
      border: 2px solid #1d2733;
      border-radius: 12px;
      box-shadow: 6px 6px 0 #1d2733;
    }
    M08

    Options in the picker

    open to see
    select,
    ::picker(select) {
      appearance: base-select;
    }
    
    ::picker(select) {
      padding: 6px;
      border: 1px solid #8794a3;
      border-radius: 10px;
    }
    option {
      padding: 8px 12px;
      border-radius: 6px;
    }
    option:hover,
    option:focus-visible {
      color: #1d2733;
      background-color: #e7f0ff;
    }
    option:checked {
      color: #fff;
      background-color: #2f6fed;
      font-weight: 600;
    }
    option:disabled {
      color: #8794a3;
      text-decoration: line-through;
    }
    M09

    ::checkmark restyled and moved

    open to see::checkmark
    select,
    ::picker(select) {
      appearance: base-select;
    }
    
    option::checkmark {
      content: "●";
      order: 1;
      margin-inline-start: auto;
      color: #d6336c;
    }
    M10

    ::checkmark removed

    open to see::checkmark
    select,
    ::picker(select) {
      appearance: base-select;
    }
    
    option::checkmark {
      display: none;
    }
    option:checked {
      font-weight: 700;
    }
    M11

    HTML inside options

    open to seeHTML inside <option>
    <select>
      <option>
        <svg viewBox="0 0 16 16" width="16" height="16" fill="#e03131" aria-hidden="true"><circle cx="8" cy="8" r="6"/></svg>
        <span>Cherry</span>
        <small>sold by the punnet</small>
      </option>
      …
    </select>select,
    ::picker(select) {
      appearance: base-select;
    }
    
    option {
      gap: 10px;
      padding: 8px 12px;
    }
    option svg {
      flex: none;
    }
    option small {
      margin-inline-start: auto;
      padding-inline-start: 16px;
      font-size: 12px;
      opacity: .7;
    }

    Without support the tags are dropped and each option reads as plain text.

    M12

    selectedcontent in the button

    <selectedcontent>
    <select>
      <button>
        <selectedcontent></selectedcontent>
      </button>
      <option>
        <svg viewBox="0 0 16 16" width="16" height="16" fill="#e03131" aria-hidden="true"><circle cx="8" cy="8" r="6"/></svg>
        <span>Cherry</span>
        <small>sold by the punnet</small>
      </option>
      …
    </select>select,
    ::picker(select) {
      appearance: base-select;
    }
    
    select {
      padding: 8px 12px;
      border-radius: 8px;
    }
    selectedcontent {
      display: flex;
      align-items: center;
      gap: 8px;
    }
    selectedcontent small {
      display: none;
    }
    option {
      gap: 10px;
      padding: 8px 12px;
    }
    option small {
      margin-inline-start: auto;
      padding-inline-start: 16px;
      font-size: 12px;
      opacity: .7;
    }

    The button mirrors the chosen option, icon included, and hides the small print.

    M13

    Animated picker

    open to see@starting-styletransition-behavior: allow-discrete
    select,
    ::picker(select) {
      appearance: base-select;
    }
    @media (prefers-reduced-motion: no-preference) {
      ::picker(select) {
        opacity: 0;
        translate: 0 -8px;
        transition:
          opacity .2s,
          translate .2s,
          display .2s allow-discrete,
          overlay .2s allow-discrete;
      }
      ::picker(select):popover-open {
        opacity: 1;
        translate: 0 0;
      }
      @starting-style {
        ::picker(select):popover-open {
          opacity: 0;
          translate: 0 -8px;
        }
      }
    }
    M14

    Picker placed with anchor positioning

    open to seeposition-area
    select,
    ::picker(select) {
      appearance: base-select;
    }
    
    ::picker(select) {
      position-area: top center;
      position-try-fallbacks: flip-block;
      margin: 0 0 8px;
    }

    Opens above the button, centred on it.

    M15

    Picker as a grid of swatches

    open to see<selectedcontent>
    select,
    ::picker(select) {
      appearance: base-select;
    }
    
    selectedcontent {
      display: flex;
      align-items: center;
      gap: 8px;
    }
    select:open::picker(select) {
      display: grid;
      grid-template-columns: repeat(4, 44px);
      gap: 6px;
      padding: 8px;
      border-radius: 12px;
    }
    option {
      justify-content: center;
      width: 44px;
      height: 44px;
      padding: 0;
      border-radius: 10px;
    }
    option svg {
      width: 28px;
      height: 28px;
    }
    option .name {
      position: absolute;
      width: 1px;
      height: 1px;
      overflow: hidden;
      clip-path: inset(50%);
    }
    option::checkmark {
      display: none;
    }
    option:checked {
      outline: 3px solid CanvasText;
      outline-offset: -3px;
    }
    selectedcontent svg {
      width: 16px;
      height: 16px;
    }
    selectedcontent .name {
      position: static;
      width: auto;
      height: auto;
      clip-path: none;
    }

    Colour names stay in the markup for assistive tech and for the fallback.

    M16

    legend and hr in the picker

    open to see
    <optgroup label="Tropical fruit">
      <legend>Tropical fruit</legend>
      <option>Mango</option> …
    </optgroup>
    <hr>select,
    ::picker(select) {
      appearance: base-select;
    }
    
    legend {
      padding: 10px 12px 4px;
      font: 700 11px/1 system-ui, sans-serif;
      letter-spacing: .08em;
      text-transform: uppercase;
      opacity: .7;
    }
    optgroup option {
      padding-inline-start: 12px;
    }
    hr {
      margin: 6px 0;
      border: 0;
      border-top: 1px solid #8794a3;
    }
    M17

    Base listbox

    select {
      appearance: base-select;
    }

    Listbox mode arrived later than the dropdown: Chrome and Edge 145.

    M18

    Styled base listbox

    ::checkmark
    select {
      appearance: base-select;
      width: 14em;
      padding: 6px;
      color: #1d2733;
      background-color: #fff;
      border: 1px solid #8794a3;
      border-radius: 10px;
    }
    option {
      padding: 6px 10px;
      border-radius: 6px;
    }
    option:checked {
      background-color: #e7f0ff;
      font-weight: 600;
    }
    option::checkmark {
      content: "✓";
      color: #2f6fed;
    }
    M19

    Base multi-select popup

    open to see
    <select multiple size="1">select,
    ::picker(select) {
      appearance: base-select;
    }

    The newest mode. Few browsers style it yet.

    M20

    Fallback first, then @supports

    open to see
    /* 1. Every browser */
    select {
      -webkit-appearance: none;
      appearance: none;
      padding: 9px 40px 9px 12px;
      font: 16px/1.25 system-ui, sans-serif;
      color: #1d2733;
      background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%231d2733' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='m3 6 5 5 5-5'/%3E%3C/svg%3E") no-repeat right 12px center / 16px 16px;
      border: 1px solid #8794a3;
      border-radius: 8px;
    }
    
    /* 2. Browsers with customizable select */
    @supports (appearance: base-select) {
      select,
      ::picker(select) {
        appearance: base-select;
      }
      select {
        padding-right: 12px;
        background-image: none;
      }
      ::picker(select) {
        margin-block: 6px;
        padding: 6px;
        color: #1d2733;
        background-color: #fff;
        border: 1px solid #8794a3;
        border-radius: 10px;
        box-shadow: 0 8px 24px rgba(29, 39, 51, .18);
      }
      option {
        padding: 8px 10px;
        border-radius: 6px;
      }
      option:checked {
        background-color: #e7f0ff;
      }
    }

    Looks finished in every browser; the picker improves where it can.

    M21

    Complete dark picker

    open to see<selectedcontent>::picker-icon
    <select>
      <button>
        <selectedcontent></selectedcontent>
      </button>
      <option>
        <svg viewBox="0 0 16 16" width="16" height="16" fill="#e03131" aria-hidden="true"><circle cx="8" cy="8" r="6"/></svg>
        <span>Cherry</span>
        <small>sold by the punnet</small>
      </option>
      …
    </select>select,
    ::picker(select) {
      appearance: base-select;
    }
    
    select {
      min-width: 16em;
      padding: 10px 14px;
      font: 16px/1.25 system-ui, sans-serif;
      color: #fff;
      background-color: #1d2733;
      border: 1px solid #45556a;
      border-radius: 10px;
    }
    select:hover {
      background-color: #263341;
    }
    select::picker-icon {
      color: #ffe066;
    }
    select:open::picker-icon {
      rotate: 180deg;
    }
    selectedcontent {
      display: flex;
      align-items: center;
      gap: 10px;
    }
    selectedcontent small {
      display: none;
    }
    ::picker(select) {
      margin-block: 6px;
      padding: 6px;
      color: #fff;
      background-color: #1d2733;
      border: 1px solid #45556a;
      border-radius: 12px;
      box-shadow: 0 12px 32px rgba(0, 0, 0, .35);
    }
    option {
      gap: 10px;
      padding: 9px 10px;
      border-radius: 8px;
    }
    option:hover,
    option:focus-visible {
      background-color: #2d3c4d;
    }
    option:checked {
      background-color: #2f6fed;
    }
    option small {
      margin-inline-start: auto;
      padding-inline-start: 16px;
      font-size: 12px;
      opacity: .75;
    }
    option::checkmark {
      content: "✓";
      order: 2;
    }