aboutsummaryrefslogtreecommitdiff
path: root/src/components/desktop_nav/desktop_nav.scss
blob: 8fd8e6202e4fd4b5cfc36bfe44218a951345310d (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
@import '../../_variables.scss';

.DesktopNav {
  height: 50px;
  width: 100%;
  position: fixed;

  .inner-nav {
    display: grid;
    grid-template-rows: 50px;
    grid-template-columns: 2fr auto 2fr;
    grid-template-areas: "sitename logo actions";
    box-sizing: border-box;
    padding: 0 1.2em;
    margin: auto;
    max-width: 980px;
  }

  &.-logoLeft {
    grid-template-columns: auto 2fr 2fr;
    grid-template-areas: "logo sitename actions";
  }

  .button-default {
    &, svg {
      color: $fallback--text;
      color: var(--btnTopBarText, $fallback--text);
    }

    &:active {
      background-color: $fallback--fg;
      background-color: var(--btnPressedTopBar, $fallback--fg);
      color: $fallback--text;
      color: var(--btnPressedTopBarText, $fallback--text);
    }

    &:disabled {
      color: $fallback--text;
      color: var(--btnDisabledTopBarText, $fallback--text);
    }

    &.toggled {
      color: $fallback--text;
      color: var(--btnToggledTopBarText, $fallback--text);
      background-color: $fallback--fg;
      background-color: var(--btnToggledTopBar, $fallback--fg)
    }
  }

  .logo {
    grid-area: logo;
    position: relative;
    transition: opacity;
    transition-timing-function: ease-out;
    transition-duration: 100ms;

    @media all and (min-width: 800px) {
      opacity: 1 !important;
    }

    .mask {
      mask-repeat: no-repeat;
      mask-position: center;
      mask-size: contain;
      background-color: $fallback--fg;
      background-color: var(--topBarText, $fallback--fg);
      position: absolute;
      top: 0;
      bottom: 0;
      left: 0;
      right: 0;
    }

    img {
      display: inline-block;
      height: 50px;
    }
  }

  .nav-icon {
    margin-left: 0.2em;
    width: 2em;
    height: 100%;
    text-align: center;

    .svg-inline--fa {
      color: $fallback--link;
      color: var(--topBarLink, $fallback--link);
    }
  }

  .sitename {
    grid-area: sitename;
  }

  .actions {
    grid-area: actions;
  }

  .item {
    flex: 1;
    line-height: 50px;
    height: 50px;
    overflow: hidden;
    display: flex;
    flex-wrap: wrap;

    &.right {
      justify-content: flex-end;
      text-align: right;
    }
  }
}