control-sidebar.less 5.4 KB
Newer Older
A
Abdullah Almsaeed 已提交
1
/*
D
Dmitri Suvorov 已提交
2
 * Component: Control sidebar. By default, this is the right sidebar.
A
Abdullah Almsaeed 已提交
3
 */
D
Dmitri Suvorov 已提交
4
//The sidebar's background control class
5 6 7
//This is a hack to make the background visible while scrolling
.control-sidebar-bg {
  position: fixed;
8
  z-index: 1000;
D
Dennis Neufeld 已提交
9
  bottom: 0;
10 11 12
}
//Transitions
.control-sidebar-bg,
A
Abdullah Almsaeed 已提交
13
.control-sidebar {
14 15
  top: 0;
  right: -@control-sidebar-width;
D
Dennis Neufeld 已提交
16
  width: @control-sidebar-width;
17
  .transition(right @transition-speed ease-in-out);
18
}
19
//The sidebar
D
Dennis Neufeld 已提交
20 21 22
.control-sidebar {
  position: absolute;
  padding-top: @navbar-height;
23
  z-index: 1010;
24
  //Fix position after header collapse
A
Abdullah Almsaeed 已提交
25
  @media (max-width: @screen-sm) {
A
Updates  
Abdullah Almsaeed 已提交
26
    padding-top: @navbar-height + 50;
A
Abdullah Almsaeed 已提交
27 28 29
  }
  //Tab panes
  > .tab-content {
A
Abdullah Almsaeed 已提交
30 31
    padding: 10px 15px;
  }
32
  //Open state with slide over content effect
A
Abdullah Almsaeed 已提交
33
  &.control-sidebar-open {
34 35
    &,
    + .control-sidebar-bg {
D
Dennis Neufeld 已提交
36
      right: 0;
37
    }
A
Abdullah Almsaeed 已提交
38 39
  }
}
D
Dmitri Suvorov 已提交
40
//Open without slide over content
D
Dennis Neufeld 已提交
41
.control-sidebar-open {
42
  .control-sidebar-bg,
A
Abdullah Almsaeed 已提交
43
  .control-sidebar {
44
    right: 0;
A
Abdullah Almsaeed 已提交
45
  }
46 47 48 49 50 51
  @media(min-width: @screen-sm) {
    .content-wrapper,
    .right-side,
    .main-footer {
      margin-right: @control-sidebar-width;
    }
A
Abdullah Almsaeed 已提交
52 53
  }
}
A
Abdullah Almsaeed 已提交
54
//Control sidebar tabs
55
.nav-tabs.control-sidebar-tabs {
A
Abdullah Almsaeed 已提交
56
  > li {
57 58
    &:first-of-type > a {
      &,
59 60 61
      &:hover,
        &:focus {
        border-left-width: 0;
D
Dennis Neufeld 已提交
62
      }
63
    }
A
Abdullah Almsaeed 已提交
64
    > a {
65 66
      .border-radius(0);

A
Abdullah Almsaeed 已提交
67 68 69
      //Hover and active states
      &,
      &:hover {
A
Abdullah Almsaeed 已提交
70
        border-top: none;
A
Abdullah Almsaeed 已提交
71
        border-right: none;
72 73
        border-left: 1px solid transparent;
        border-bottom: 1px solid transparent;
A
Abdullah Almsaeed 已提交
74 75 76 77 78 79 80 81 82 83 84 85
      }
      .icon {
        font-size: 16px;
      }
    }
    //Active state
    &.active {
      > a {
        &,
        &:hover,
          &:focus,
          &:active {
86 87 88
          border-top: none;
          border-right: none;
          border-bottom: none;
A
Abdullah Almsaeed 已提交
89 90 91
        }
      }
    }
A
Abdullah Almsaeed 已提交
92
  }
D
Dmitri Suvorov 已提交
93
  //Remove responsiveness on small screens
A
Abdullah Almsaeed 已提交
94 95 96
  @media(max-width: @screen-sm) {
    display: table;
    >li {
97
      display: table-cell;
A
Abdullah Almsaeed 已提交
98 99
    }
  }
A
Abdullah Almsaeed 已提交
100 101
}
//Headings in the sidebar content
D
Dennis Neufeld 已提交
102
.control-sidebar-heading {
A
Abdullah Almsaeed 已提交
103 104 105 106
  font-weight: 400;
  font-size: 16px;
  padding: 10px 0;
  margin-bottom: 10px;
A
Abdullah Almsaeed 已提交
107
}
A
Abdullah Almsaeed 已提交
108
//Subheadings
A
Abdullah Almsaeed 已提交
109 110 111 112
.control-sidebar-subheading {
  display: block;
  font-weight: 400;
  font-size: 14px;
A
Abdullah Almsaeed 已提交
113 114 115 116 117 118 119 120 121
}
//Control Sidebar Menu
.control-sidebar-menu {
  list-style: none;
  padding: 0;
  margin: 0 -15px;
  > li > a {
    .clearfix();
    display: block;
D
Dennis Neufeld 已提交
122
    padding: 10px 15px;
A
Abdullah Almsaeed 已提交
123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141
    > .control-sidebar-subheading {
      margin-top: 0;
    }
  }
  .menu-icon {
    float: left;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    text-align: center;
    line-height: 35px;
  }
  .menu-info {
    margin-left: 45px;
    margin-top: 3px;
    > .control-sidebar-subheading {
      margin: 0;
    }
    > p {
D
Dennis Neufeld 已提交
142
      margin: 0;
A
Abdullah Almsaeed 已提交
143 144
      font-size: 11px;
    }
145
  }
A
Abdullah Almsaeed 已提交
146 147 148
  .progress {
    margin: 0;
  }
149 150 151
}
//Dark skin
.control-sidebar-dark {
D
Dennis Neufeld 已提交
152
  color: @sidebar-dark-color;
153
  // Background
A
Updates  
Abdullah Almsaeed 已提交
154
  &,
155 156 157 158
  + .control-sidebar-bg {
    background: @sidebar-dark-bg;
  }
  // Sidebar tabs
159
  .nav-tabs.control-sidebar-tabs {
160 161 162 163 164 165 166
    border-bottom: darken(@sidebar-dark-bg, 3%);
    > li {
      > a {
        background: darken(@sidebar-dark-bg, 5%);
        color: @sidebar-dark-color;
        //Hover and active states
        &,
167 168 169
        &:hover,
          &:focus {
          border-left-color: darken(@sidebar-dark-bg, 7%);
D
Dennis Neufeld 已提交
170
          border-bottom-color: darken(@sidebar-dark-bg, 7%);
171 172 173 174 175 176
        }
        &:hover,
          &:focus,
          &:active {
          background: darken(@sidebar-dark-bg, 3%);
        }
177 178 179
        &:hover {
          color: #fff;
        }
180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217
      }
      //Active state
      &.active {
        > a {
          &,
          &:hover,
            &:focus,
            &:active {
            background: @sidebar-dark-bg;
            color: #fff;
          }
        }
      }
    }
  }
  //Heading & subheading
  .control-sidebar-heading,
  .control-sidebar-subheading {
    color: #fff;
  }
  //Sidebar list
  .control-sidebar-menu {
    > li {
      > a {
        &:hover {
          background: @sidebar-dark-hover-bg;
        }
        .menu-info {
          > p {
            color: @sidebar-dark-color;
          }
        }
      }
    }
  }
}
//Light skin
.control-sidebar-light {
D
Dennis Neufeld 已提交
218
  color: lighten(@sidebar-light-color, 10%);
219
  // Background
A
Updates  
Abdullah Almsaeed 已提交
220
  &,
221 222 223 224 225
  + .control-sidebar-bg {
    background: @sidebar-light-bg;
    border-left: 1px solid @gray;
  }
  // Sidebar tabs
226
  .nav-tabs.control-sidebar-tabs {
227 228 229 230 231 232 233
    border-bottom: @gray;
    > li {
      > a {
        background: darken(@sidebar-light-bg, 5%);
        color: @sidebar-light-color;
        //Hover and active states
        &,
234 235 236 237
        &:hover,
          &:focus {
          border-left-color: @gray;
          border-bottom-color: @gray;
238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279
        }
        &:hover,
          &:focus,
          &:active {
          background: darken(@sidebar-light-bg, 3%);
        }
      }
      //Active state
      &.active {
        > a {
          &,
          &:hover,
            &:focus,
            &:active {
            background: @sidebar-light-bg;
            color: #111;
          }
        }
      }
    }
  }
  //Heading & subheading
  .control-sidebar-heading,
  .control-sidebar-subheading {
    color: #111;
  }
  //Sidebar list
  .control-sidebar-menu {
    margin-left: -14px;
    > li {
      > a {
        &:hover {
          background: @sidebar-light-hover-bg;
        }
        .menu-info {
          > p {
            color: lighten(@sidebar-light-color, 10%);
          }
        }
      }
    }
  }
D
Dennis Neufeld 已提交
280
}