Skip to content

Adds selector ‘strategy’ plugin option #39

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Mar 26, 2021
Prev Previous commit
Next Next commit
Use .form-multiselect & .form-file classes where applicable
  • Loading branch information
chasegiunta committed Mar 25, 2021
commit 5ec6608c6dc7a6326d6cd5e7e2a1cb4ae3965cb8
8 changes: 4 additions & 4 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const forms = plugin.withOptions(function (options) {
}

const baseSelectors = {
class: '.form-input, .form-textarea, .form-select',
class: '.form-input, .form-textarea, .form-select, .form-multiselect',
base:
"[type='text'],[type='email'], [type='url'], [type='password'], [type='number'], [type='date'], [type='datetime-local'], [type='month'], [type='search'], [type='tel'], [type='time'], [type='week'], [multiple], textarea, select",
}
Expand Down Expand Up @@ -81,7 +81,7 @@ const forms = plugin.withOptions(function (options) {
'color-adjust': `exact`,
},

[swap(`[multiple]`, `.form-select[multiple], .form-input[multiple]`)]: {
[swap(`[multiple]`, `.form-multiselect, .form-input[multiple]`)]: {
'background-image': 'initial',
'background-position': 'initial',
'background-repeat': 'unset',
Expand Down Expand Up @@ -180,7 +180,7 @@ const forms = plugin.withOptions(function (options) {
'background-color': 'currentColor',
},

[swap(`[type='file']`, `.form-input[type='file']`)]: {
[swap(`[type='file']`, `.form-file`)]: {
background: 'unset',
'border-color': 'inherit',
'border-width': '0',
Expand All @@ -190,7 +190,7 @@ const forms = plugin.withOptions(function (options) {
'line-height': 'inherit',
},

[swap(`[type='file']:focus`, `.form-input[type='file']:focus`)]: {
[swap(`[type='file']:focus`, `.form-file:focus`)]: {
outline: `1px solid ButtonText`,
outline: `1px auto -webkit-focus-ring-color`,
},
Expand Down