summaryrefslogtreecommitdiffstats
path: root/browser/components/newtab/content-src/components/CollapsibleSection/_CollapsibleSection.scss
blob: 9811339b27d18a922d537b22aef4bc2e2941d161 (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
.collapsible-section {
  padding: $section-vertical-padding $section-horizontal-padding;

  .section-title-container {
    margin: 0;

    &.has-subtitle {
      display: flex;
      flex-direction: column;

      @media (min-width: $break-point-large) {
        flex-direction: row;
        align-items: baseline;
        justify-content: space-between;
      }
    }
  }

  .section-title {
    font-size: $section-title-font-size;
    font-weight: 600;
    color: var(--newtab-text-primary-color);

    &.grey-title {
      color: var(--newtab-text-primary-color);
      display: inline-block;
      fill: var(--newtab-text-primary-color);
      vertical-align: middle;
    }

    .section-title-contents {
      // Center "What's Pocket?" for "mobile" viewport
      @media (max-width: $break-point-medium - 1) {
        display: block;

        .learn-more-link-wrapper {
          display: block;
          text-align: center;

          .learn-more-link {
            margin-inline-start: 0;
          }
        }
      }

      vertical-align: top;
    }
  }

  .section-sub-title {
    font-size: 14px;
    line-height: 16px;
    color: var(--newtab-text-secondary-color);
    opacity: 0.3;
  }

  .section-top-bar {
    min-height: 19px;
    margin-bottom: 13px;
    position: relative;
  }

  &.active {
    background: var(--newtab-element-hover-color);
    border-radius: 4px;
  }

  .learn-more-link {
    font-size: 13px;
    margin-inline-start: 12px;

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

  .section-body-fallback {
    height: $card-height;
  }

  .section-body {
    // This is so the top sites favicon and card dropshadows don't get clipped during animation:
    $horizontal-padding: 7px;

    margin: 0 (-$horizontal-padding);
    padding: 0 $horizontal-padding;

    &.animating {
      overflow: hidden;
      pointer-events: none;
    }
  }

  &[data-section-id='topsites'] {
    .section-top-bar {
      display: none;
    }
  }

  // Hide first story card for the medium breakpoint to prevent orphaned third story
  &[data-section-id='topstories'] .card-outer:first-child {
    @media (min-width: $break-point-medium) and (max-width: $break-point-large - 1) {
      display: none;
    }
  }
}