Skip to content

Commit

Permalink
Increase contrast in form elements. (vufind-org#3207)
Browse files Browse the repository at this point in the history
  • Loading branch information
pasitiis authored Dec 22, 2023
1 parent 9d0e3d5 commit 74bac9e
Show file tree
Hide file tree
Showing 8 changed files with 38 additions and 18 deletions.
2 changes: 1 addition & 1 deletion themes/bootprint3/css/compiled.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion themes/bootstrap3/css/compiled.css

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions themes/bootstrap3/less/components/form.less
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
form {
.form-control {
border-color: #888;
&:focus {
border-color: #3F9AE4;
}
}
textarea:invalid,
input:invalid {
box-shadow: 0 0 2px 1px rgba(255, 0, 0, 0.9);
Expand Down
6 changes: 6 additions & 0 deletions themes/bootstrap3/scss/components/form.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
form {
.form-control {
border-color: #888;
&:focus {
border-color: #3F9AE4;
}
}
textarea:invalid,
input:invalid {
box-shadow: 0 0 2px 1px rgba(255, 0, 0, 0.9);
Expand Down
2 changes: 1 addition & 1 deletion themes/local_theme_example/css/compiled.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion themes/sandal/css/compiled.css

Large diffs are not rendered by default.

18 changes: 11 additions & 7 deletions themes/sandal/less/common.less
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,19 @@ table { font-size: @reduced-font-size; }

.form-control { box-shadow: none; }
.form-control:hover,
.form-control:focus { border-color: @brand-primary; }
.form-control:focus {
padding-bottom: 4px; // Prevent jumping
border-bottom: 3px solid @brand-secondary;
box-shadow: none;
/* #LESS> */
--outline-color: fade(@brand-primary, 40%);
/* <#LESS */
/* #SCSS>
--outline-color: color.change($brand-primary, $alpha: 0.4);
<#SCSS */

border-color: @brand-primary;
outline: 4px solid var(--outline-color);
}
select.form-control {
padding-bottom: @padding-base-vertical;
border: 1px solid @light-silver;
.form-control:focus {
--outline-color: @gold;
}

.breadcrumb a { color: @dark-gray; }
Expand Down
18 changes: 11 additions & 7 deletions themes/sandal/scss/common.scss
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,19 @@ table { font-size: $reduced-font-size; }

.form-control { box-shadow: none; }
.form-control:hover,
.form-control:focus { border-color: $brand-primary; }
.form-control:focus {
padding-bottom: 4px; // Prevent jumping
border-bottom: 3px solid $brand-secondary;
box-shadow: none;
/* #LESS>
--outline-color: rgba($brand-primary, (40/100));
<#LESS */
/* #SCSS> */
--outline-color: color.change($brand-primary, $alpha: 0.4);
/* <#SCSS */

border-color: $brand-primary;
outline: 4px solid var(--outline-color);
}
select.form-control {
padding-bottom: $padding-base-vertical;
border: 1px solid $light-silver;
.form-control:focus {
--outline-color: $gold;
}

.breadcrumb a { color: $dark-gray; }
Expand Down

0 comments on commit 74bac9e

Please sign in to comment.