lbry-desktop/ui/scss/component/menu-button.scss

154 lines
2.7 KiB
SCSS
Raw Permalink Normal View History

2020-03-19 15:38:20 +01:00
// Extends reach-ui menu button base stylesheet
2019-06-17 22:32:38 +02:00
/* Used to detect in JavaScript if apps have loaded styles or not. */
:root {
--reach-menu-button: 1;
}
[data-reach-menu] {
display: block;
position: absolute;
2020-07-23 16:22:57 +02:00
z-index: 2;
2019-07-21 23:31:22 +02:00
font-size: var(--font-body);
max-width: calc(100% - var(--height-button) - var(--spacing-xs));
2019-06-17 22:32:38 +02:00
}
[data-reach-menu-list] {
display: block;
white-space: nowrap;
outline: none;
2019-11-22 22:13:00 +01:00
background-color: var(--color-menu-background);
2020-07-23 16:22:57 +02:00
border: 1px solid var(--border-color);
2019-06-17 22:32:38 +02:00
border-top: none;
}
[data-reach-menu-item] {
display: block;
2020-07-23 16:22:57 +02:00
z-index: 2;
2019-12-06 21:57:07 +01:00
&:focus {
box-shadow: none;
}
2019-06-17 22:32:38 +02:00
}
[data-reach-menu-item] {
cursor: pointer;
display: block;
color: inherit;
font: inherit;
text-decoration: initial;
2020-07-23 16:22:57 +02:00
border-radius: var(--border-radius);
2019-11-22 22:13:00 +01:00
}
2019-06-17 22:32:38 +02:00
2019-11-22 22:13:00 +01:00
[data-reach-menu-item][data-selected] {
background-color: var(--color-menu-background--active);
box-shadow: none;
2020-07-23 16:22:57 +02:00
}
2019-06-17 22:32:38 +02:00
.menu__button {
display: flex;
justify-content: center;
align-items: center;
border-radius: 100%;
padding: 0.3rem;
.icon {
stroke: var(--color-menu-icon);
}
&:focus,
&:hover {
opacity: 1;
background-color: var(--color-button-alt-bg);
.icon {
stroke: var(--color-menu-icon-active);
}
}
}
2020-03-18 18:33:17 +01:00
.menu__list {
2020-01-22 15:26:39 +01:00
box-shadow: var(--card-box-shadow);
2019-08-21 22:54:44 +02:00
animation: menu-animate-in var(--animation-duration) var(--animation-style);
border: 1px solid var(--color-border);
border-radius: var(--border-radius);
padding: var(--spacing-xs) 0;
[data-reach-menu-item] {
margin: 0 var(--spacing-xs);
}
2019-06-17 22:32:38 +02:00
}
2020-03-18 18:33:17 +01:00
.menu__list--header {
@extend .menu__list;
margin-top: var(--spacing-s);
2020-03-18 18:33:17 +01:00
}
2020-07-15 18:36:40 +02:00
.menu__list--comments {
@extend .menu__list;
}
2019-06-17 22:32:38 +02:00
.menu__link {
display: flex;
align-items: center;
2020-07-23 16:22:57 +02:00
padding: var(--spacing-s);
2020-06-01 19:03:19 +02:00
padding-right: var(--spacing-l);
2020-07-23 16:22:57 +02:00
height: var(--button-height);
2019-06-17 22:32:38 +02:00
2019-08-27 16:43:42 +02:00
.icon {
2019-11-22 22:13:00 +01:00
stroke: var(--color-menu-icon);
2020-06-01 19:03:19 +02:00
margin-right: var(--spacing-s);
2019-08-27 16:43:42 +02:00
}
2020-03-18 18:33:17 +01:00
.badge {
2020-06-01 19:03:19 +02:00
margin-left: var(--spacing-s);
2020-03-18 18:33:17 +01:00
}
2019-08-27 16:43:42 +02:00
}
.menu__link-help {
@extend .menu__link;
display: block;
color: var(--color-text-help);
font-size: var(--font-small);
padding-top: 0;
white-space: normal;
text-overflow: ellipsis;
overflow-x: hidden;
}
2020-07-23 16:22:57 +02:00
.menu__link--notification {
2021-08-23 12:50:24 +02:00
width: 100%;
2020-07-23 16:22:57 +02:00
display: flex;
align-items: flex-start;
.icon__wrapper {
height: 2.5rem;
width: 2.5rem;
}
&:hover {
cursor: pointer;
}
}
2020-08-21 21:44:54 +02:00
.menu__link--notification-nolink {
@extend .menu__link--notification;
&:hover {
cursor: default;
}
}
2020-07-23 16:22:57 +02:00
.menu__link--all-notifications {
@extend .button--alt;
width: auto;
align-self: flex-start;
margin-right: auto;
font-weight: var(--font-weight-bold);
margin-top: var(--spacing-m);
}
.menu__separator {
margin-top: var(--border-radius);
margin-bottom: var(--border-radius);
}