Skip to content

Commit

Permalink
Two bug-fixes for forced-color mode (#2443)
Browse files Browse the repository at this point in the history
* add forced-color media-query / forced-color-adjust css prop

* create a mixin for forced-color-mode / adjust cta colors with

* update colours to use system color in forced-color mode

* slider-btn to buttontext instead
  • Loading branch information
SebinSong authored Dec 3, 2024
1 parent c9c47d6 commit 6ad6149
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 0 deletions.
6 changes: 6 additions & 0 deletions frontend/assets/style/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,12 @@ $payment-table-desktop-bp: 1290px;
}
}

@mixin if-forced-color-mode {
@media (forced-colors: active) {
@content;
}
}

%unselectable {
-webkit-touch-callout: none;
-webkit-user-select: none;
Expand Down
8 changes: 8 additions & 0 deletions frontend/views/components/modal/ModalClose.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ export default ({
cursor: pointer;
background-color: $general_1;
@include if-forced-color-mode {
border: 1px solid buttonborder;
}
@include tablet {
top: 1.5rem;
right: 1.5rem;
Expand Down Expand Up @@ -87,6 +91,10 @@ export default ({
transition: transform 0.15s ease-in;
transform: translateX(-50%) translateY(-50%) rotate(45deg);
transform-origin: center center;
@include if-forced-color-mode {
background-color: buttonborder;
}
}
&::after {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -488,6 +488,11 @@ img.c-preview-image {
background-color: var(--image-viewer-slider-bg-color);
border-radius: 0.5rem;
opacity: 0.675;
@include if-forced-color-mode {
border: 1px solid buttonborder;
opacity: 1;
}
}
}
Expand All @@ -514,6 +519,16 @@ img.c-preview-image {
&.show-slider-output ::v-deep .sOutput {
display: inline-block;
}
::v-deep input.sInput {
forced-color-adjust: none;
@include if-forced-color-mode {
background: none;
border: 1px solid buttonborder;
color: buttontext;
}
}
}
.c-loader-animation {
Expand Down

0 comments on commit 6ad6149

Please sign in to comment.