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 55 56
//Control sidebar tabs
.control-sidebar-tabs {
  > li {
57 58 59 60 61
    &:first-of-type > a {
      margin-left: 1px;
      &,
      &:hover {
        border-left-width: 0!important;
D
Dennis Neufeld 已提交
62
      }
63
    }
A
Abdullah Almsaeed 已提交
64
    > a {
A
Abdullah Almsaeed 已提交
65
      .border-radius(0)!important;
A
Abdullah Almsaeed 已提交
66 67 68
      //Hover and active states
      &,
      &:hover {
A
Abdullah Almsaeed 已提交
69
        border-top: none;
A
Abdullah Almsaeed 已提交
70
        border-right: none;
71 72
        border-left: 1px solid transparent!important;
        border-bottom: 1px solid transparent!important;
A
Abdullah Almsaeed 已提交
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90
      }
      .icon {
        font-size: 16px;
      }
    }
    //Active state
    &.active {
      > a {
        &,
        &:hover,
          &:focus,
          &:active {
          border-top: none!important;
          border-right: none!important;
          border-bottom: none!important;
        }
      }
    }
A
Abdullah Almsaeed 已提交
91
  }
D
Dmitri Suvorov 已提交
92
  //Remove responsiveness on small screens
A
Abdullah Almsaeed 已提交
93 94 95 96 97 98
  @media(max-width: @screen-sm) {
    display: table;
    >li {
      display: table-cell!important;
    }
  }
A
Abdullah Almsaeed 已提交
99 100
}
//Headings in the sidebar content
D
Dennis Neufeld 已提交
101
.control-sidebar-heading {
A
Abdullah Almsaeed 已提交
102 103 104 105
  font-weight: 400;
  font-size: 16px;
  padding: 10px 0;
  margin-bottom: 10px;
A
Abdullah Almsaeed 已提交
106
}
A
Abdullah Almsaeed 已提交
107
//Subheadings
A
Abdullah Almsaeed 已提交
108 109 110 111
.control-sidebar-subheading {
  display: block;
  font-weight: 400;
  font-size: 14px;
A
Abdullah Almsaeed 已提交
112 113 114 115 116 117 118 119 120
}
//Control Sidebar Menu
.control-sidebar-menu {
  list-style: none;
  padding: 0;
  margin: 0 -15px;
  > li > a {
    .clearfix();
    display: block;
D
Dennis Neufeld 已提交
121
    padding: 10px 15px;
A
Abdullah Almsaeed 已提交
122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140
    > .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 已提交
141
      margin: 0;
A
Abdullah Almsaeed 已提交
142 143
      font-size: 11px;
    }
144
  }
A
Abdullah Almsaeed 已提交
145 146 147
  .progress {
    margin: 0;
  }
148 149 150
}
//Dark skin
.control-sidebar-dark {
D
Dennis Neufeld 已提交
151
  color: @sidebar-dark-color;
152
  // Background
A
Updates  
Abdullah Almsaeed 已提交
153
  &,
154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 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
  + .control-sidebar-bg {
    background: @sidebar-dark-bg;
  }
  // Sidebar tabs
  .control-sidebar-tabs {
    border-bottom: darken(@sidebar-dark-bg, 3%);
    > li {
      > a {
        background: darken(@sidebar-dark-bg, 5%);
        color: @sidebar-dark-color;
        //Hover and active states
        &,
        &:hover {
          border-left-color: darken(@sidebar-dark-bg, 7%)!important;
          border-bottom-color: darken(@sidebar-dark-bg, 7%)!important;
        }
        &:hover,
          &:focus,
          &:active {
          background: darken(@sidebar-dark-bg, 3%);
        }
      }
      //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 已提交
213
  color: lighten(@sidebar-light-color, 10%);
214
  // Background
A
Updates  
Abdullah Almsaeed 已提交
215
  &,
216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 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
  + .control-sidebar-bg {
    background: @sidebar-light-bg;
    border-left: 1px solid @gray;
  }
  // Sidebar tabs
  .control-sidebar-tabs {
    border-bottom: @gray;
    > li {
      > a {
        background: darken(@sidebar-light-bg, 5%);
        color: @sidebar-light-color;
        //Hover and active states
        &,
        &:hover {
          border-left-color: @gray!important;
          border-bottom-color: @gray!important;
        }
        &: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 已提交
274
}