Skip to content

Commit 73d5b01

Browse files
Remove chevron for selects with a non-default size (#137)
* Remove chevron for selects with a non-default size * wip * wip * wip * update * Only target `size` fix for select elements * Swap attribute and element They have different specificity * Update changelog
1 parent 615a228 commit 73d5b01

File tree

3 files changed

+25
-3
lines changed

3 files changed

+25
-3
lines changed

Diff for: CHANGELOG.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10-
- Nothing yet!
10+
### Fixed
11+
12+
- Remove chevron for selects with a non-default size ([#137](https://github.com/tailwindlabs/tailwindcss-forms/pull/137))
1113

1214
## [0.5.3] - 2022-09-02
1315

Diff for: kitchen-sink.html

+20
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,16 @@ <h2 class="text-2xl font-bold">Reset styles</h2>
102102
<option>Option 2</option>
103103
</select>
104104
</label>
105+
<label class="block">
106+
<span class="text-gray-700">Select (single, with size)</span>
107+
<select class="form-select block w-full mt-1" size="3">
108+
<option>Option 1</option>
109+
<option>Option 2</option>
110+
<option>Option 3</option>
111+
<option>Option 4</option>
112+
<option>Option 5</option>
113+
</select>
114+
</label>
105115
<label class="block">
106116
<span class="text-gray-700">Select (multiple)</span>
107117
<select class="form-multiselect block w-full mt-1" multiple>
@@ -112,6 +122,16 @@ <h2 class="text-2xl font-bold">Reset styles</h2>
112122
<option>Option 5</option>
113123
</select>
114124
</label>
125+
<label class="block">
126+
<span class="text-gray-700">Select (multiple, with size)</span>
127+
<select class="form-multiselect block w-full mt-1" multiple size="3">
128+
<option>Option 1</option>
129+
<option>Option 2</option>
130+
<option>Option 3</option>
131+
<option>Option 4</option>
132+
<option>Option 5</option>
133+
</select>
134+
</label>
115135
<label class="block">
116136
<span class="text-gray-700">Textarea</span>
117137
<textarea

Diff for: src/index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,8 @@ const forms = plugin.withOptions(function (options = { strategy: undefined }) {
143143
},
144144
},
145145
{
146-
base: ['[multiple]'],
147-
class: null,
146+
base: ['[multiple]', '[size]:where(select:not([size="1"]))'],
147+
class: ['.form-select:where([size]:not([size="1"]))'],
148148
styles: {
149149
'background-image': 'initial',
150150
'background-position': 'initial',

0 commit comments

Comments
 (0)