Skip to content

Commit

Permalink
Merge pull request #3111 from kimcoleman/select-field-show-icon-dropdown
Browse files Browse the repository at this point in the history
Better select dropdown field arrow; fixes for dark background themes
  • Loading branch information
dparker1005 authored Aug 6, 2024
2 parents 2c0c424 + a00bc2f commit 8107a3a
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
15 changes: 13 additions & 2 deletions css/frontend/variation_1.css
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@
}

.pmpro_form_input {
background-color: var(--pmpro--color--white);
background-color: var(--pmpro--color--base);
border: 1px solid var(--pmpro--color--border);
border-radius: var(--pmpro--base--border-radius);
box-shadow: none;
Expand All @@ -296,6 +296,17 @@
width: 100%;
}

.pmpro_form_input-select {
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
background-image: url('data:image/svg+xml;utf8,<svg height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
background-position: right var(--pmpro--base--spacing--small) center;
background-repeat: no-repeat;
background-size: 16px 16px;
padding-right: calc(var(--pmpro--base--spacing--small) + 20px);
}

.pmpro_form_input-text:focus,
.pmpro_form_input-email:focus,
.pmpro_form_input-url:focus,
Expand All @@ -309,7 +320,7 @@
.pmpro_form_input-file:focus,
.pmpro_form_input-date:focus,
.pmpro_form_input-textarea:focus {
background-color: var(--pmpro--color--white);
background-color: var(--pmpro--color--base);
border-color: #80BDFF;
box-shadow: 0 0 0 0.2rem rgba(0,123,255,.25);
outline: none;
Expand Down
11 changes: 11 additions & 0 deletions css/frontend/variation_high_contrast.css
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,17 @@
width: 100%;
}

.pmpro_form_input-select {
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
background-image: url('data:image/svg+xml;utf8,<svg height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
background-position: right var(--pmpro--base--spacing--small) center;
background-repeat: no-repeat;
background-size: 16px 16px;
padding-right: calc(var(--pmpro--base--spacing--small) + 20px);
}

.pmpro_form_input-text:focus,
.pmpro_form_input-email:focus,
.pmpro_form_input-url:focus,
Expand Down

0 comments on commit 8107a3a

Please sign in to comment.