Skip to content

Commit

Permalink
[BootstrapAdminUi] Improve inputs contrast ratio (#147)
Browse files Browse the repository at this point in the history
Fixes #146
  • Loading branch information
loic425 authored Dec 9, 2024
2 parents 77c73fc + 4b14488 commit 8dbf4b2
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 22 deletions.
18 changes: 17 additions & 1 deletion src/BootstrapAdminUi/assets/styles/_form.scss
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,21 @@ textarea.form-control {
}

.form-select:disabled {
color: var(--tblr-gray-500);
color: var(--tblr-gray-600);
}

.input-group {
box-shadow: none;

.form-check {
flex-grow: 1;
}

.input-group-text {
color: var(--tblr-gray-600);
}
}

.form-control:focus {
box-shadow: none;
}
5 changes: 2 additions & 3 deletions src/BootstrapAdminUi/assets/styles/_tom-select.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,8 @@
}

.focus .ts-control {
border-color: #adb5bd;
outline: 0;
box-shadow: var(--tblr-box-shadow-input), 0 0 0 0.25rem rgba(173, 181, 189, 0.25);
border: 1px solid var(--tblr-focus-ring-color);
box-shadow: 0 0 0 1px var(--tblr-focus-ring-color);
}

.ts-dropdown, .ts-dropdown.form-control, .ts-dropdown.form-select {
Expand Down
36 changes: 24 additions & 12 deletions src/BootstrapAdminUi/assets/styles/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,35 @@ $gray-800: #343a40 !default;
$gray-900: #212529 !default;
$black: #000 !default;

$body-color: $gray-900;
$body-color: $gray-900;

$link-color: $body-color;
$link-decoration: underline;
$link-hover-color: $primary;
$link-hover-decoration: null;
$text-secondary: $gray-600;
$text-secondary-light: $gray-500;
$text-secondary-dark: $gray-700;

$input-focus-border-color: $gray-500;
$link-color: $body-color;
$link-decoration: underline;
$link-hover-color: $primary;
$link-hover-decoration: null;

$focus-ring-width: .25rem;
$focus-ring-opacity: .25;
$focus-ring-color: rgba($gray-500, $focus-ring-opacity);
$focus-ring-blur: 0;
$disabled-color: $gray-600;
$form-secondary-color: $gray-600;

$input-border-color: $gray-400;
$input-border-color-translucent: $gray-400;
$input-focus-border-color: $gray-600;

$focus-ring-width: 0;
$focus-ring-color: $input-focus-border-color;
$focus-ring-blur: 0;
$focus-ring-box-shadow: 0 0 $focus-ring-blur $focus-ring-width $focus-ring-color;

$pagination-active-color: inherit;
$pagination-active-bg: $gray-200;
$input-btn-focus-width: $focus-ring-width;

$btn-border-color: $input-border-color;

$pagination-active-color: inherit;
$pagination-active-bg: $gray-200;

$font-family-sans-serif: 'Inter', serif;

Expand Down
6 changes: 3 additions & 3 deletions src/BootstrapAdminUi/public/app.css

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions src/BootstrapAdminUi/public/app.rtl.css

Large diffs are not rendered by default.

0 comments on commit 8dbf4b2

Please sign in to comment.