discourse/app/assets/stylesheets/mobile/float-kit/d-menu.scss
chapoi 95922fe96b
UX: scope btn states to touch devices (#31731)
Buttons used in the dMenu mobile (touch device) variant should not:
* show states like hover, or focus
* should never have round borders because the component is full-width
2025-03-11 11:14:57 +01:00

63 lines
1.2 KiB
SCSS
Vendored

.fk-d-menu-modal {
&__grip {
position: absolute;
top: 2.5px;
left: 50%;
transform: translateX(-50%);
background: var(--primary-medium);
height: 5px;
width: 15vw;
max-width: 100px;
border-radius: 10px;
}
.d-modal__body {
padding: 1em 0;
}
h3 {
padding-top: 0.25em;
}
.dropdown-menu {
li a:focus-visible {
outline: 0;
}
&__item {
.btn {
border-radius: 0; //overruling the general border-radius var on all btns
//all specific overrules to make sure touch devices dont show focus states, which we apply on opening of the menu
&:focus-visible,
&:active {
.discourse-touch & {
background: transparent;
color: var(--primary);
.d-icon {
color: inherit;
}
&.btn-danger {
background: transparent;
color: var(--danger);
.d-icon {
color: var(--danger-hover);
}
}
}
}
}
}
li > .btn,
li > a {
padding: 0.75em 1rem;
}
li > a {
display: block;
}
}
}