Skip to content

Commit c846b72

Browse files
authored
Allow for <input> without type (#141)
* Allow for <input> without `type` * Remove note in readme * Add element to selector * Use :where
1 parent 73d5b01 commit c846b72

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

README.md

-2
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,6 @@ Currently we add basic utility-friendly form styles for the following form eleme
5151
- `select[multiple]`
5252
- `textarea`
5353

54-
**Note that for text inputs, you must add the `type="text"` attribute for these styles to take effect.** This is a necessary trade-off to avoid relying on the overly greedy `input` selector and unintentionally styling elements we don't have solutions for yet, like `input[type="range"]` for example.
55-
5654
Every element has been normalized/reset to a simple visually consistent style that is easy to customize with utilities, even elements like `<select>` or `<input type="checkbox">` that normally need to be reset with `appearance: none` and customized using custom CSS:
5755

5856
```html

src/index.js

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ const forms = plugin.withOptions(function (options = { strategy: undefined }) {
1717
{
1818
base: [
1919
"[type='text']",
20+
"input:where(:not([type]))",
2021
"[type='email']",
2122
"[type='url']",
2223
"[type='password']",

0 commit comments

Comments
 (0)