Skip to content

Commit

Permalink
Fix minimap toggle visibility
Browse files Browse the repository at this point in the history
  • Loading branch information
albinazs authored and thibaudcolas committed Sep 24, 2024
1 parent c2b35b8 commit fbe26bd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 25 deletions.
4 changes: 2 additions & 2 deletions client/src/components/Minimap/CollapseAll.scss
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
position: absolute;
top: $minimap-top-offset;
inset-inline-end: 0;
margin-top: theme('spacing.3');
margin-inline-end: theme('spacing.3');
margin-top: theme('spacing.5');
margin-inline-end: theme('spacing.10');

.side-panel-open & {
inset-inline-end: var(--side-panel-width, 0);
Expand Down
24 changes: 1 addition & 23 deletions client/src/components/Minimap/Minimap.scss
Original file line number Diff line number Diff line change
Expand Up @@ -53,30 +53,10 @@ $minimap-z-index: calc(theme('zIndex.header') - 20);
background-color: theme('colors.surface-page');
color: theme('colors.icon-primary');
transform: rotate(180deg);
// Expand is available for keyboard users only.
opacity: 0;
pointer-events: none;

@include media-breakpoint-up(sm) {
margin-top: theme('spacing.9');
margin-top: 18px;
padding: theme('spacing.[1.5]');

*:focus {
opacity: 1;
pointer-events: auto;
}

// Ensure the toggle button is only visible when it has **focus-visible**.
// With fallback focus styles for browsers that lack focus-visible support.
*:focus:not(:focus-visible) {
opacity: 0;
pointer-events: none;
}

&:focus-visible {
opacity: 1;
pointer-events: auto;
}
}

.icon {
Expand All @@ -85,8 +65,6 @@ $minimap-z-index: calc(theme('zIndex.header') - 20);
}

:where(.w-minimap--expanded) & {
opacity: 1;
pointer-events: auto;
margin-top: theme('spacing.3');
margin-inline-start: theme('spacing.3');
padding: theme('spacing.3');
Expand Down

0 comments on commit fbe26bd

Please sign in to comment.