summaryrefslogtreecommitdiffstats
path: root/browser/components/newtab/content-src/asrouter/components/SnippetBase/_SnippetBase.scss
blob: 86bc30fa8b9cd9fbca770421f34d04a42e20c1ea (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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
.SnippetBaseContainer {
  position: fixed;
  z-index: 2;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: var(--newtab-background-color-secondary);
  color: var(--newtab-text-primary-color);
  font-size: 14px;
  line-height: 20px;
  border-top: 1px solid transparent;
  box-shadow: $shadow-secondary;
  display: flex;
  align-items: center;

  a {
    cursor: pointer;
    color: var(--newtab-primary-action-background);

    &:hover {
      text-decoration: underline;
    }

    [lwt-newtab-brighttext] & {
      font-weight: bold;
    }
  }

  input {
    &[type='checkbox'] {
      margin-inline-start: 0;
    }
  }

  .innerWrapper {
    margin: 0 auto;
    display: flex;
    align-items: center;
    padding: 12px $section-horizontal-padding;
    // This is to account for the block button on smaller screens
    padding-inline-end: 36px;
    max-width: $wrapper-max-width-large + ($section-horizontal-padding * 2);

    @media (min-width: $break-point-large) {
      padding-inline-end: $section-horizontal-padding;
    }

    @media (min-width: $break-point-widest) {
      max-width: $wrapper-max-width-widest + ($section-horizontal-padding * 2);
    }
  }

  .blockButton {
    display: none;
    background: none;
    border: 0;
    position: absolute;
    top: 20px;
    inset-inline-end: 12px;
    height: 16px;
    width: 16px;
    background-image: url('chrome://global/skin/icons/close.svg');
    -moz-context-properties: fill;
    color: inherit;
    fill: currentColor;
    opacity: 0.5;
    margin-top: -8px;
    padding: 0;
    cursor: pointer;
  }

  &:hover .blockButton {
    display: block;
  }

  .icon {
    height: 42px;
    width: 42px;
    margin-inline-end: 12px;
    flex-shrink: 0;
  }
}

.snippets-preview-banner {
  font-size: 15px;
  line-height: 42px;
  color: var(--newtab-text-primary-color);
  background: var(--newtab-background-color-secondary);
  text-align: center;
  position: absolute;
  top: 0;
  width: 100%;

  span {
    vertical-align: middle;
  }
}

// We show snippet icons for both themes and conditionally hide
// based on which theme is currently active
body {
  &:not([lwt-newtab-brighttext]) {
    .icon-dark-theme,
    .icon.icon-dark-theme,
    .scene2Icon .icon-dark-theme {
      display: none;
    }
  }

  &[lwt-newtab-brighttext] {
    .icon-light-theme,
    .icon.icon-light-theme,
    .scene2Icon .icon-light-theme {
      display: none;
    }
  }
}