You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+35-21
Original file line number
Diff line number
Diff line change
@@ -37,27 +37,41 @@ module.exports = {
37
37
38
38
All of the basic form elements you use will now have some simple default styles that are easy to override with utilities.
39
39
40
-
Currently we add basic utility-friendly form styles for the following form element types:
41
-
42
-
-`input[type='text']`
43
-
-`input[type='password']`
44
-
-`input[type='email']`
45
-
-`input[type='number']`
46
-
-`input[type='url']`
47
-
-`input[type='date']`
48
-
-`input[type='datetime-local']`
49
-
-`input[type='month']`
50
-
-`input[type='week']`
51
-
-`input[type='time']`
52
-
-`input[type='search']`
53
-
-`input[type='tel']`
54
-
-`input[type='checkbox']`
55
-
-`input[type='radio']`
56
-
-`select`
57
-
-`select[multiple]`
58
-
-`textarea`
59
-
60
-
**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.
40
+
There's currently two options you can choose in how we we add basic utility-friendly form styles:
41
+
42
+
-`base` - The default selector strategy
43
+
-`class` - Requires a `form-` class to be applied to the form element in order for styles to be applied
**Note that for text inputs, when using the default `base` strategy, 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.
61
75
62
76
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:
0 commit comments