mirror of
https://github.com/discourse/discourse.git
synced 2024-11-29 19:08:33 +08:00
17c92b4b2a
This commit adds a new option `@modalForMobile` for `<DMenu />` which allows to display a `<DModal />` when expanding a menu on mobile. This commit also adds a `@views` options to toasts which is an array accepting `['mobile', 'desktop']` and will control if the toast is show on desktop and/or mobile. Finally this commit allows to hide the progressBar even if the toast is set to `@autoClose=true`. This is controlled through the `@showProgressBar` option.
90 lines
1.3 KiB
SCSS
90 lines
1.3 KiB
SCSS
@keyframes d-menu-opening {
|
|
0% {
|
|
opacity: 0;
|
|
}
|
|
|
|
100% {
|
|
opacity: 1;
|
|
}
|
|
}
|
|
|
|
.fk-d-menu {
|
|
width: max-content;
|
|
position: absolute;
|
|
top: 0;
|
|
max-width: 600px;
|
|
display: flex;
|
|
padding: 0;
|
|
z-index: z("dropdown");
|
|
|
|
&__trigger {
|
|
.touch & {
|
|
@include unselectable;
|
|
}
|
|
}
|
|
|
|
&.-animated {
|
|
animation: d-menu-opening 0.15s ease-in;
|
|
|
|
&[data-placement^="bottom"] {
|
|
transform-origin: top center;
|
|
}
|
|
|
|
&[data-placement^="top"] {
|
|
transform-origin: bottom center;
|
|
}
|
|
|
|
&[data-placement^="right"] {
|
|
transform-origin: center left;
|
|
}
|
|
|
|
&[data-placement^="left"] {
|
|
transform-origin: center right;
|
|
}
|
|
}
|
|
|
|
&[data-strategy="fixed"] {
|
|
position: fixed;
|
|
}
|
|
|
|
&__inner-content {
|
|
display: flex;
|
|
border-radius: var(--d-border-radius);
|
|
background-color: var(--secondary);
|
|
border: 1px solid var(--primary-low);
|
|
box-shadow: var(--shadow-menu-panel);
|
|
}
|
|
|
|
.arrow {
|
|
position: absolute;
|
|
color: var(--secondary);
|
|
}
|
|
|
|
&[data-placement^="top"] {
|
|
.arrow {
|
|
bottom: -9px;
|
|
rotate: 180deg;
|
|
}
|
|
}
|
|
|
|
&[data-placement^="bottom"] {
|
|
.arrow {
|
|
top: -10px;
|
|
}
|
|
}
|
|
|
|
&[data-placement^="right"] {
|
|
.arrow {
|
|
rotate: -90deg;
|
|
left: -9px;
|
|
}
|
|
}
|
|
|
|
&[data-placement^="left"] {
|
|
.arrow {
|
|
rotate: 90deg;
|
|
right: -9px;
|
|
}
|
|
}
|
|
}
|