Skip to content

Commit

Permalink
管理画面 エラー時のフォーカス色を赤に
Browse files Browse the repository at this point in the history
  • Loading branch information
seto1 committed Jan 17, 2024
1 parent 374168e commit 6a8259e
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@
&:has(.form-error) input {
border: 1px solid $color_danger;
}
&:has(.form-error) input:focus {
box-shadow: $focus_shadow_error;
}

&__date {
&-label {
Expand Down
9 changes: 9 additions & 0 deletions plugins/bc-admin-third/src/css/components/_radio.scss
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@
box-shadow: 0 0 0 4px #fff inset;
}

&.form-error:checked + label:before {
background: $color_danger;
}

&:disabled + label:before {
background: #ddd;
}
Expand All @@ -89,6 +93,11 @@
border-color: $color_primary;
border-width: 1px;
}

&.form-error:focus + label:before {
box-shadow: 0 0 0 4px #fff inset, $focus_shadow_error;
border-color: $color_danger;
}
}

&__label {
Expand Down
4 changes: 4 additions & 0 deletions plugins/bc-admin-third/src/css/theme/_unknown.scss
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@
border:1px solid $color_danger!important;
}

.form-error:focus {
box-shadow: $focus_shadow_error !important;
}

.error {
color: #C30;
}
Expand Down
1 change: 1 addition & 0 deletions plugins/bc-admin-third/src/css/theme/var/_dimensions.scss
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,5 @@ $button_padding_bottom: 0.6em;

// focus時のシャドウ
$focus_shadow: 0 0 4px 0px $color_primary;
$focus_shadow_error: 0 0 4px 0px $color_danger;

15 changes: 14 additions & 1 deletion plugins/bc-admin-third/webroot/css/admin/style.css

Large diffs are not rendered by default.

0 comments on commit 6a8259e

Please sign in to comment.