← Files DataARCHIVED FILE

output_formats/html/src/control-styles.css

4.38 KB · Nov 19, 2026 · 00:12 UTC

↓ Download file

See the change to this file →

/* Shared control primitives used by Data apps and the homepage. */
.dashboard-icon {
  display: inline-block;
  flex: 0 0 auto;
  background: currentColor;
  mask: var(--dashboard-icon-mask) center / contain no-repeat;
}

.filter-trigger {
  display: flex;
  min-width: 0;
  max-width: 100%;
  min-height: var(--data-control-height, 32px);
  align-items: center;
  gap: var(--space-2);
  padding: 0 var(--space-3);
  border: 1px solid var(--border);
  border-radius: var(--control-radius);
  background: var(--control);
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
}
.filter-trigger:not(:disabled):hover {
  border-color: var(--border-strong);
  background: var(--interaction-hover);
}
/* The whole select chip is one hit target, including its label and value.
   Native overflow help is anchored on the trigger, never an interactive child. */
.select-trigger > * { pointer-events: none; }
.select-trigger:disabled { opacity: .45; cursor: default; }
.custom-select-host { display: contents; }
.native-filter-shell { display: none; }
.native-filter-control { display: none; }
.theme-appearance-native { display: none; }
.theme-appearance-menu { display: contents; }
@media (max-width: 900px) and (hover: none) and (pointer: coarse) {
  .theme-appearance-native { display: contents; }
  .theme-appearance-menu { display: none; }
  .custom-select-host.has-native-picker { display: none; }
  .native-filter-shell {
    position: relative;
    display: inline-flex;
    width: max-content;
    max-width: 100%;
    min-height: 44px;
    align-items: center;
  }
  .native-filter-shell .native-filter-control {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    opacity: 0;
    pointer-events: auto;
    cursor: pointer;
  }
  .native-filter-shell:has(> select:focus-visible:not([data-pointer-focus])) { outline: 2px solid var(--accent); outline-offset: 2px; }
}
.select-value { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.filter-trigger[data-state="open"] {
  border-color: var(--border-strong);
  background: var(--interaction-active);
}

.filter-label {
  color: var(--secondary);
}
.filter-trigger > .filter-label { white-space: nowrap; }
.filter-typeahead {
  display: flex;
  align-items: center;
  gap: 8px;
}
.filter-typeahead > .filter-label {
  font-size: 12px;
  white-space: nowrap;
}
.filter-typeahead > .typeahead { width: 188px; }
.chevron {
  color: var(--secondary);
}
.filter-trigger > .chevron {
  flex: 0 0 auto;
  margin-inline-start: auto;
}
.popover {
  z-index: 100;
  display: grid;
  min-width: 188px;
  gap: 0;
  padding: var(--radius-sm);
  border: 0.5px solid color-mix(in srgb, var(--text) 8%, transparent);
  border-radius: var(--radius-2xl);
  background: var(--surface-raised);
  color: var(--text);
  box-shadow: 0 4px 16px rgb(0 0 0 / 5%);
}
.select-content {
  box-sizing: border-box;
  width: max(188px, var(--radix-dropdown-menu-trigger-width));
  max-width: calc(100vw - 24px);
  max-height: min(320px, var(--radix-dropdown-menu-content-available-height));
  overflow-y: auto;
}

.menu-item {
  display: flex;
  width: 100%;
  min-height: 36px;
  align-items: center;
  gap: var(--radius-sm);
  padding: 8px var(--space-2) 8px 10px;
  border: 0;
  border-radius: var(--radius-lg);
  background: transparent;
  color: var(--text);
  font-size: 14px;
  font-weight: 400;
  line-height: 18px;
  outline: none;
  cursor: pointer;
  text-align: left;
  text-decoration: none;
}
.menu-item-label { flex: 1 1 auto; }
.menu-check { display: grid; width: 18px; flex: 0 0 18px; margin-left: auto; place-items: center; }
.menu-chevron { flex: 0 0 auto; margin-left: auto; }
.menu-separator { height: 1px; margin: 4px 3px; background: var(--border); }
.menu-group-label { padding: 8px 10px 4px; color: var(--secondary); font-size: 12px; font-weight: 500; }
.menu-item > svg:last-child { flex: 0 0 auto; }
.menu-item:hover,
.menu-item:focus,
.menu-item[data-highlighted],
.menu-item[data-state="checked"],
.menu-item[data-state="open"] {
  background: var(--interaction-hover);
}
:root[data-color-scheme="dark"] :is(.menu-item:hover, .menu-item:focus, .menu-item[data-highlighted],
  .menu-item[data-state="checked"], .menu-item[data-state="open"]) {
  background: var(--interaction-active);
}
.menu-item:focus-visible {
  outline: none;
}
.menu-sub-content {
  min-width: 160px;
}
.menu-item.danger {
  color: var(--negative);
}

SHA-256: 77329592da4059269015ce84337509424fab141331f2fce9b71ac4f4b75d4831