/
githubmirror
/
components
Обзор
Документация
Войти
/
githubmirror
/
components
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/components-examples/aria/autocomplete/autocomplete.css
147 строк
3 KB
Joy Serquiña
fix(aria/combobox): improve autocomplete placeholder text color contrast (#33465)
01 июл 2026, 19:08
Не верифицирован
01 июл 2026, 19:08
e2cab48
Код
Авторство
О чём код?
.example-autocomplete { display: flex; position: relative; align-items: center; /* stylelint-disable-next-line material/no-prefixes -- Valid in all remotely recent browsers. */ width: fit-content; /* The ::placeholder selectors are intentionally separated. The 'material/no-prefixes' stylelint rule flags the standard ::placeholder when grouped with vendor prefixes. Each prefix is on its own rule to comply. Vendor prefixes are included to ensure consistent placeholder styling across different browsers. NOTE: These styles are primarily needed for internal testing. */ /* stylelint-disable material/no-prefixes -- Provides all prefixes for ::placeholder */ input::-webkit-input-placeholder { color: var(--mat-sys-on-surface-variant); } input::-moz-placeholder /* Firefox 19+ */ { color: var(--mat-sys-on-surface-variant); } input:-ms-input-placeholder /* IE 10+ */ { color: var(--mat-sys-on-surface-variant); } input:-moz-placeholder /* Firefox 18- */ { color: var(--mat-sys-on-surface-variant); } input::placeholder { color: var(--mat-sys-on-surface-variant); } } .example-search-icon, .example-check-icon { font-size: 1.25rem; pointer-events: none; } .example-search-icon { left: 0.75rem; position: absolute; } input[ngCombobox] { width: 13rem; font-size: 0.9rem; border-radius: var(--mat-sys-corner-extra-small); padding: 0.7rem 2.5rem; outline-color: var(--mat-sys-primary); border: 1px solid var(--mat-sys-outline); background-color: var(--mat-sys-surface); } input[ngCombobox][aria-disabled='true'], input[ngCombobox]:disabled { cursor: default; opacity: 0.5; background-color: var(--mat-sys-surface-dim); } .example-clear-button { position: absolute; right: 0.5rem; background-color: transparent; border: none; display: flex; width: 2rem; height: 2rem; align-items: center; cursor: pointer; } .example-clear-icon { font-size: 1.25rem; } .example-popup { width: 100%; margin-top: 2px; padding: 0.1rem; max-height: 11rem; border-radius: var(--mat-sys-corner-extra-small); background-color: var(--mat-sys-surface); border: 1px solid var(--mat-sys-outline); } .example-no-results { padding: 1rem; } [ngListbox] { gap: 2px; height: 100%; display: flex; overflow: auto; flex-direction: column; } [ngOption] { display: flex; cursor: pointer; align-items: center; margin: 1px; font-size: 0.9rem; padding: 0.7rem; border-radius: var(--mat-sys-corner-extra-small); } [ngOption][aria-disabled='true'] { cursor: default; opacity: 0.5; background-color: var(--mat-sys-surface-dim); } [ngOption]:hover { background-color: color-mix(in srgb, var(--mat-sys-primary) 5%, transparent); } [ngOption][data-active='true'] { outline-offset: -2px; outline: 2px solid var(--mat-sys-primary); } [ngOption][aria-selected='true'] { color: var(--mat-sys-primary); background-color: color-mix(in srgb, var(--mat-sys-primary) 10%, transparent); } [ngOption]:not([aria-selected='true']) .example-check-icon { display: none; } .example-option-label { flex: 1; } .example-check-icon { font-size: 0.9rem; }