Skip to content

Commit

Permalink
fix: use css variable for themeability
Browse files Browse the repository at this point in the history
  • Loading branch information
sagarvora committed Apr 29, 2021
1 parent 0742a75 commit 2fefa24
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 2 additions & 6 deletions frappe/public/scss/common/global.scss
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ input[type="checkbox"] {
box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.1);
border-radius: 4px;

// Reset Browser Behavior
// Reset browser behavior
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
Expand All @@ -52,11 +52,7 @@ input[type="checkbox"] {

&:focus {
outline: none; // Prevent browser behavior
box-shadow: 0 0 0 2px var(--gray-300);

[data-theme="dark"] & {
box-shadow: 0 0 0 2px var(--gray-600);
}
box-shadow: var(--checkbox-focus-shadow);
}

&.disabled-deselected, &:disabled {
Expand Down
1 change: 1 addition & 0 deletions frappe/public/scss/desk/css_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ $input-height: 28px !default;
// checkbox
--checkbox-right-margin: var(--margin-xs);
--checkbox-size: 14px;
--checkbox-focus-shadow: 0 0 0 2px var(--gray-300);

// timeline
--timeline-item-icon-size: 34px;
Expand Down
3 changes: 3 additions & 0 deletions frappe/public/scss/desk/dark.scss
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@
// input
--input-disabled-bg: none;

// checkbox
--checkbox-focus-shadow: 0 0 0 2px var(--gray-600);

color-scheme: dark;

.frappe-card {
Expand Down

0 comments on commit 2fefa24

Please sign in to comment.