summaryrefslogtreecommitdiffstats
path: root/browser/components/newtab/content-src/components/ContextMenu/_ContextMenu.scss
blob: c0074128e696af9d2b94cb1d88217427fc50af57 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
@use 'sass:math';

.context-menu {
  background: var(--newtab-background-color-secondary);
  border-radius: $context-menu-border-radius;
  box-shadow: $context-menu-shadow;
  display: block;
  font-size: $context-menu-font-size;
  margin-inline-start: 5px;
  inset-inline-start: 100%;
  position: absolute;
  top: math.div($context-menu-button-size, 4);
  z-index: 8;

  > ul {
    list-style: none;
    margin: 0;
    padding: $context-menu-outer-padding 0;

    > li {
      margin: 0;
      width: 100%;

      &.separator {
        border-bottom: $border-secondary;
        margin: $context-menu-outer-padding 0;
      }

      > a,
      > button {
        align-items: center;
        color: inherit;
        cursor: pointer;
        display: flex;
        width: 100%;
        line-height: 16px;
        outline: none;
        border: 0;
        padding: $context-menu-item-padding;
        white-space: nowrap;

        &:is(:focus, :hover) {
          background: var(--newtab-element-secondary-hover-color);
        }

        &:active {
          background: var(--newtab-element-secondary-active-color);
        }

        &.disabled {
          opacity: 0.4;
          pointer-events: none;
        }
      }
    }
  }
}