summaryrefslogtreecommitdiff
path: root/Redcore-daylight/gtk-3.20/scss/widgets/_notebook.scss
blob: 92fa86bbca459977510b135b8c8da3ed5a9563e8 (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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
@import "button";


/**********
 ! Notebook
***********/

@include exports("notebook") {

notebook {
  padding: 0;

  &.frame {
    border: 1px solid $borders_color;

    > header {
      // ugly hack to hide the borders around the header
      margin: -1px;
      &.top { margin-bottom: 0; }
      &.bottom { margin-top: 0; }
      &.left { margin-right: 0; }
      &.right { margin-left: 0; }

      &.top, &.bottom { padding-left: 0; padding-right: 0; }
      &.left, &.right { padding-top: 0; padding-bottom: 0; }
    }
  }

  > stack:not(:only-child) { // the :not(:only-child) is for "hidden" notebooks
    background-color: $bg_color;
  }

  > header {
    padding: $spacing;
    background-color: $bg_color;

    &.top {    box-shadow: inset  0  -1px $borders_color; }
    &.bottom { box-shadow: inset  0   1px $borders_color; }
    &.right {  box-shadow: inset  1px 0   $borders_color; }
    &.left {   box-shadow: inset -1px 0   $borders_color; }

  @each $_pos, $_bpos in (top, bottom), (bottom, top), (right, left), (left, right) {
      // sizing and borders
      &.#{$_pos} {
        padding-#{$_bpos}: 0;

        > tabs > tab {
          padding: $spacing $spacing + 8px;
          min-width: 20px;
          min-height: 20px;

          outline-offset: -4px;

          border: 1px solid transparent;
          border-#{$_bpos}: none;
          border-#{$_pos}-width: 3px;

          &:checked {
              border-#{$_pos}-color: $selected_bg_color;
          }

          // tab overlap
          + tab {
            @if $_pos==top or $_pos==bottom { margin-left: -1px; }
            @else { margin-top: -1px; }
          }


          // tab border radius
          @if $_pos==top { border-radius: 1px 1px 0 0; }
          @else if $_pos==bottom { border-radius: 0 0 1px 1px; }
          @else if $_pos==left { border-radius: 1px 0 0 1px; }
          @else if $_pos==right { border-radius: 0 1px 1px 0; }
        }
      }
    }
    // overflow arrows
    &.top, &.bottom {
      > tabs > arrow.up {
        -gtk-icon-source: -gtk-icontheme('pan-end-symbolic');
        &:last-child { margin-left: 2px; }
      }
      > tabs > arrow.down {
        -gtk-icon-source: -gtk-icontheme('pan-start-symbolic');
        &:first-child { margin-right: 2px; }
      }
    }
    &.left, &.right {
      > tabs > arrow.up {
        -gtk-icon-source: -gtk-icontheme('pan-down-symbolic');
        &:last-child { margin-top: 2px; }
      }
      > tabs > arrow.down {
        -gtk-icon-source: -gtk-icontheme('pan-up-symbolic');
        &:first-child { margin-bottom: 2px; }
      }
    }
    > tabs > arrow {
    @extend %close_button;
      color: $insensitive_fg_color;

      &:hover { color: mix($fg_color, $insensitive_fg_color, 0.5); }
      &:active { color: $fg_color; }
      &:disabled { color: alpha($insensitive_fg_color,0.3); }
    }

    // tab colors

    &.top > tabs > tab:hover:not(:checked) { box-shadow: inset 0 -1px $borders_color; }
    &.bottom > tabs > tab:hover:not(:checked) { box-shadow: inset 0 1px $borders_color; }
    &.left > tabs > tab:hover:not(:checked) { box-shadow: inset -1px 0 $borders_color; }
    &.right > tabs > tab:hover:not(:checked) { box-shadow: inset 1px 0 $borders_color; }

    > tabs > tab {
      color: alpha($fg_color, 0.8);
      background-color: alpha(mix($bg_color, $fg_color, .1), 0.7);

      &:hover:not(:checked) {
        color: mix($fg_color, $insensitive_fg_color, 0.5);
        background-color: transparentize($base_color, 0.5);
        border-color: $borders_color;
      }
      &:checked {
        border-color: $borders_color;
        color: $fg_color;
        background-color: $bg_color;
      }
      // close button
      button.flat {
        min-height: 22px;
        min-width: 16px;
        padding: 0;
        color: mix($bg_color, $fg_color, 0.35);

        &:hover {
          @extend %undecorated_button;
          color: lighten(red, 15%);
        }
        &:active, &:active:hover {
          @extend %undecorated_button;
          color: $selected_bg_color;
        }
      }
    }

  }
}

}