cheat/dev

::file-selector-button e partes internas

Estiliza o botão interno de input file e outras partes de controles nativos.

Sintaxe

input[type=file]::file-selector-button { ... }

Outras partes úteis: ::placeholder (texto de dica), ::-webkit-search-cancel-button (X da busca), ::-webkit-slider-thumb e ::-webkit-slider-runnable-track (input range) e accent-color (cor de checkbox/radio/range sem recriar o controle).

Exemplo

input[type=file]::file-selector-button {
  margin-right: 12px; padding: 8px 14px;
  border: 0; border-radius: 8px;
  background: #2f6fed; color: #fff; cursor: pointer;
}
input::placeholder { color: #9ca3af; opacity: 1; }
input[type=range] { accent-color: #2f6fed; }

Relacionados