kopia lustrzana https://github.com/wagtail/wagtail
Refactor minimap styles
rodzic
e67836da34
commit
e8a3d753e3
|
@ -8,7 +8,7 @@
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
border-color: theme('colors.border-button-small-outline-default');
|
border-color: theme('colors.border-button-small-outline-default');
|
||||||
z-index: calc($minimap-z-index + 1);
|
z-index: calc(theme('zIndex.minimap') + 1);
|
||||||
|
|
||||||
@include more-contrast-interactive();
|
@include more-contrast-interactive();
|
||||||
|
|
||||||
|
@ -33,7 +33,7 @@
|
||||||
|
|
||||||
&--floating {
|
&--floating {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: $minimap-top-offset;
|
top: var(--offset-top);
|
||||||
inset-inline-end: 0;
|
inset-inline-end: 0;
|
||||||
margin-top: theme('spacing.5');
|
margin-top: theme('spacing.5');
|
||||||
margin-inline-end: theme('spacing.10');
|
margin-inline-end: theme('spacing.10');
|
||||||
|
|
|
@ -1,24 +1,21 @@
|
||||||
// If unset, default to the "mobile" height of the slim header.
|
|
||||||
$minimap-top-offset: var(--offset-top, calc(theme('spacing.slim-header') * 2));
|
|
||||||
$minimap-width: 260px;
|
$minimap-width: 260px;
|
||||||
$minimap-collapsed-width-mobile: 20px;
|
$minimap-collapsed-width-mobile: 20px;
|
||||||
$minimap-collapsed-width: 30px;
|
$minimap-collapsed-width: 30px;
|
||||||
$minimap-overflow: theme('spacing.2');
|
$minimap-overflow: theme('spacing.2');
|
||||||
$minimap-z-index: calc(theme('zIndex.header') - 20);
|
|
||||||
|
|
||||||
@use '../../../scss/tools' as *;
|
@use '../../../scss/tools' as *;
|
||||||
|
|
||||||
@import './CollapseAll';
|
@use './CollapseAll';
|
||||||
@import './MinimapItem';
|
@use './MinimapItem';
|
||||||
|
|
||||||
.w-minimap {
|
.w-minimap {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: $minimap-top-offset;
|
top: var(--offset-top);
|
||||||
inset-inline-end: 0;
|
inset-inline-end: 0;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
height: calc(100vh - 100%);
|
height: calc(100vh - 100%);
|
||||||
z-index: $minimap-z-index;
|
z-index: theme('zIndex.minimap');
|
||||||
width: $minimap-width;
|
width: $minimap-width;
|
||||||
transform: translateX(
|
transform: translateX(
|
||||||
calc(var(--w-direction-factor) * (100% - $minimap-collapsed-width-mobile))
|
calc(var(--w-direction-factor) * (100% - $minimap-collapsed-width-mobile))
|
||||||
|
@ -37,7 +34,7 @@ $minimap-z-index: calc(theme('zIndex.header') - 20);
|
||||||
&--expanded {
|
&--expanded {
|
||||||
transform: translateX(0);
|
transform: translateX(0);
|
||||||
// Take up the whole height so overlap with the page looks better.
|
// Take up the whole height so overlap with the page looks better.
|
||||||
height: calc(100vh - $minimap-top-offset);
|
height: calc(100vh - var(--offset-top));
|
||||||
// Only transition when opening, so the closing animation doesn’t interfere with "hover to open".
|
// Only transition when opening, so the closing animation doesn’t interfere with "hover to open".
|
||||||
transition: transform 0.3s ease;
|
transition: transform 0.3s ease;
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,6 @@
|
||||||
@apply w-label-3 w-outline-offset-inside;
|
@apply w-label-3 w-outline-offset-inside;
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
width: $minimap-width;
|
|
||||||
height: theme('spacing.8');
|
height: theme('spacing.8');
|
||||||
gap: theme('spacing[2.5]');
|
gap: theme('spacing[2.5]');
|
||||||
font-weight: theme('fontWeight.normal');
|
font-weight: theme('fontWeight.normal');
|
||||||
|
|
|
@ -113,6 +113,7 @@ module.exports = {
|
||||||
'inset-inline-start, padding-inline-start, width, transform, margin-top, min-height',
|
'inset-inline-start, padding-inline-start, width, transform, margin-top, min-height',
|
||||||
},
|
},
|
||||||
zIndex: {
|
zIndex: {
|
||||||
|
'minimap': '80',
|
||||||
'header': '100',
|
'header': '100',
|
||||||
'sidebar': '110',
|
'sidebar': '110',
|
||||||
'sidebar-toggle': '120',
|
'sidebar-toggle': '120',
|
||||||
|
|
Ładowanie…
Reference in New Issue