boxes.less 7.92 KB
Newer Older
Nicolas Widart's avatar
Nicolas Widart committed
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
/*
 * Component: Box
 * --------------
 */
.box {
  position: relative;
  .border-radius(@box-border-radius);
  background: #ffffff;
  border-top: 3px solid @box-default-border-top-color;
  margin-bottom: 20px;
  width: 100%;
  box-shadow: @box-boxshadow;

  // Box color variations
  &.box-primary {
    border-top-color: @light-blue;
  }
  &.box-info {
    border-top-color: @aqua;
  }
  &.box-danger {
    border-top-color: @red;
  }
  &.box-warning {
    border-top-color: @yellow;
  }
  &.box-success {
    border-top-color: @green;
  }
  &.box-default {
31
    border-top-color: @gray-lte;
Nicolas Widart's avatar
Nicolas Widart committed
32
  }
33

Nicolas Widart's avatar
Nicolas Widart committed
34 35 36 37 38 39 40
  // collapsed mode
  &.collapsed-box {
    .box-body,
    .box-footer {
      display: none;
    }
  }
41

Nicolas Widart's avatar
Nicolas Widart committed
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
  .nav-stacked {
    > li {
      border-bottom: 1px solid @box-border-color;
      margin: 0;
      &:last-of-type {
        border-bottom: none;
      }
    }
  }

  // fixed height to 300px
  &.height-control {
    .box-body {
      max-height: 300px;
      overflow: auto;
    }
  }

  .border-right {
    border-right: 1px solid @box-border-color;
  }
  .border-left {
    border-left: 1px solid @box-border-color;
  }

  //SOLID BOX
  //---------
  //use this class to get a colored header and borders

  &.box-solid {
72
    border-top: 0;
Nicolas Widart's avatar
Nicolas Widart committed
73 74 75 76
    > .box-header {
      .btn.btn-default {
        background: transparent;
      }
77
      .btn,
Nicolas Widart's avatar
Nicolas Widart committed
78 79
      a {
        &:hover {
80
          background: rgba(0, 0, 0, 0.1);
Nicolas Widart's avatar
Nicolas Widart committed
81 82 83 84 85 86
        }
      }
    }

    // Box color variations
    &.box-default {
87
      .box-solid-variant(@gray-lte, #444);
Nicolas Widart's avatar
Nicolas Widart committed
88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107
    }
    &.box-primary {
      .box-solid-variant(@light-blue);
    }
    &.box-info {
      .box-solid-variant(@aqua);
    }
    &.box-danger {
      .box-solid-variant(@red);
    }
    &.box-warning {
      .box-solid-variant(@yellow);
    }
    &.box-success {
      .box-solid-variant(@green);
    }

    > .box-header > .box-tools .btn {
      border: 0;
      box-shadow: none;
108
    }
Nicolas Widart's avatar
Nicolas Widart committed
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

    // Fix font color for tiles
    &[class*='bg'] {
      > .box-header {
        color: #fff;
      }
    }

  }

  //BOX GROUP
  .box-group {
    > .box {
      margin-bottom: 5px;
    }
  }

  // jQuery Knob in a box
  .knob-label {
    text-align: center;
    color: #333;
    font-weight: 100;
    font-size: 12px;
    margin-bottom: 0.3em;
  }
134
}
Nicolas Widart's avatar
Nicolas Widart committed
135

136 137
.box,
.overlay-wrapper {
Nicolas Widart's avatar
Nicolas Widart committed
138 139 140 141 142 143 144 145 146 147 148
  // Box overlay for LOADING STATE effect
  > .overlay,
  > .loading-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
  }

  .overlay {
149
    z-index: 50;
Nicolas Widart's avatar
Nicolas Widart committed
150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165
    background: rgba(255, 255, 255, 0.7);
    .border-radius(@box-border-radius);
    > .fa {
      position: absolute;
      top: 50%;
      left: 50%;
      margin-left: -15px;
      margin-top: -15px;
      color: #000;
      font-size: 30px;
    }
  }

  .overlay.dark {
    background: rgba(0, 0, 0, 0.5);
  }
166
}
Nicolas Widart's avatar
Nicolas Widart committed
167

168 169 170 171 172
//Add clearfix to header, body and footer
.box-header,
.box-body,
.box-footer {
  .clearfix();
Nicolas Widart's avatar
Nicolas Widart committed
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
}

//Box header
.box-header {
  color: #444;
  display: block;
  padding: @box-padding;
  position: relative;

  //Add bottom border
  &.with-border {
    border-bottom: 1px solid @box-border-color;
    .collapsed-box & {
      border-bottom: none;
    }
  }

  //Icons and box title
  > .fa,
  > .glyphicon,
  > .ion,
  .box-title {
    display: inline-block;
    font-size: 18px;
    margin: 0;
    line-height: 1;
  }
  > .fa,
  > .glyphicon,
  > .ion {
    margin-right: 5px;
  }
  > .box-tools {
    position: absolute;
    right: 10px;
    top: 5px;
    [data-toggle="tooltip"] {
      position: relative;
    }
212

Nicolas Widart's avatar
Nicolas Widart committed
213 214 215 216 217 218
    &.pull-right {
      .dropdown-menu {
        right: 0;
        left: auto;
      }
    }
219 220 221 222

    .dropdown-menu > li > a {
      color: #444!important;
    }
Nicolas Widart's avatar
Nicolas Widart committed
223 224 225 226 227 228 229 230 231 232 233 234 235
  }
}

//Box Tools Buttons
.btn-box-tool {
  padding: 5px;
  font-size: 12px;
  background: transparent;
  color: darken(@box-default-border-top-color, 20%);
  .open &,
  &:hover {
    color: darken(@box-default-border-top-color, 40%);
  }
236 237
  &.btn:active {
    box-shadow: none;
Nicolas Widart's avatar
Nicolas Widart committed
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
  }
}

//Box Body
.box-body {
  .border-radius(0; 0; @box-border-radius; @box-border-radius);
  padding: @box-padding;
  .no-header & {
    .border-top-radius(@box-border-radius);
  }
  // Tables within the box body
  > .table {
    margin-bottom: 0;
  }

  // Calendar within the box body
  .fc {
    margin-top: 5px;
  }

  .full-width-chart {
    margin: -19px;
  }
  &.no-padding .full-width-chart {
    margin: -9px;
  }

  .box-pane {
    .border-radius(0; 0; @box-border-radius; 0);
  }
  .box-pane-right {
    .border-radius(0; 0; 0; @box-border-radius);
  }
}

//Box footer
.box-footer {
  .border-radius(0; 0; @box-border-radius; @box-border-radius);
  border-top: 1px solid @box-border-color;
  padding: @box-padding;
  background-color: @box-footer-bg;
}
280

Nicolas Widart's avatar
Nicolas Widart committed
281 282 283 284 285 286 287 288 289 290 291
.chart-legend {
  &:extend(.list-unstyled);
  margin: 10px 0;
  > li {
    @media (max-width: @screen-sm-max) {
      float: left;
      margin-right: 10px;
    }
  }
}

292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324
//Comment Box
.box-comments {
  background: #f7f7f7;
  .box-comment {
    .clearfix();
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    &:last-of-type {
      border-bottom: 0;
    }
    &:first-of-type {
      padding-top: 0;
    }
    img {
      &:extend(.img-sm);
      float: left;
    }
  }
  .comment-text {
    margin-left: 40px;
    color: #555;
  }
  .username {
    color: #444;
    display: block;
    font-weight: 600;
  }
  .text-muted {
    font-weight: 400;
    font-size: 12px;
  }
}

Nicolas Widart's avatar
Nicolas Widart committed
325 326 327 328 329 330 331
//Widgets
//-----------

/* Widget: TODO LIST */

.todo-list {
  margin: 0;
332
  padding: 0;
Nicolas Widart's avatar
Nicolas Widart committed
333 334 335 336 337 338 339 340 341 342 343 344 345 346
  list-style: none;
  overflow: auto;
  // Todo list element
  > li {
    .border-radius(2px);
    padding: 10px;
    background: #f4f4f4;
    margin-bottom: 2px;
    border-left: 2px solid #e6e7e8;
    color: #444;
    &:last-of-type {
      margin-bottom: 0;
    }

347
    > input[type='checkbox'] {
Nicolas Widart's avatar
Nicolas Widart committed
348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386
      margin: 0 10px 0 5px;
    }

    .text {
      display: inline-block;
      margin-left: 5px;
      font-weight: 600;
    }

    // Time labels
    .label {
      margin-left: 10px;
      font-size: 9px;
    }

    // Tools and options box
    .tools {
      display: none;
      float: right;
      color: @red;
      // icons
      > .fa, > .glyphicon, > .ion {
        margin-right: 5px;
        cursor: pointer;
      }

    }
    &:hover .tools {
      display: inline-block;
    }

    &.done {
      color: #999;
      .text {
        text-decoration: line-through;
        font-weight: 500;
      }

      .label {
387
        background: @gray-lte !important;
Nicolas Widart's avatar
Nicolas Widart committed
388 389 390 391
      }
    }
  }

392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408
  // Color varaity
  .danger {
    border-left-color: @red;
  }
  .warning {
    border-left-color: @yellow;
  }
  .info {
    border-left-color: @aqua;
  }
  .success {
    border-left-color: @green;
  }
  .primary {
    border-left-color: @light-blue;
  }

Nicolas Widart's avatar
Nicolas Widart committed
409 410 411 412 413 414 415
  .handle {
    display: inline-block;
    cursor: move;
    margin: 0 5px;
  }

}
416

Nicolas Widart's avatar
Nicolas Widart committed
417 418 419 420 421 422 423 424 425 426 427 428 429 430
// END TODO WIDGET

/* Chat widget (DEPRECATED - this will be removed in the next major release. Use Direct Chat instead)*/
.chat {
  padding: 5px 20px 5px 10px;

  .item {
    .clearfix();
    margin-bottom: 10px;
    // The image
    > img {
      width: 40px;
      height: 40px;
      border: 2px solid transparent;
431 432 433 434 435 436 437 438
      .border-radius(50%);
    }

    > .online {
      border: 2px solid @green;
    }
    > .offline {
      border: 2px solid @red;
Nicolas Widart's avatar
Nicolas Widart committed
439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474
    }

    // The message body
    > .message {
      margin-left: 55px;
      margin-top: -40px;
      > .name {
        display: block;
        font-weight: 600;
      }
    }

    // The attachment
    > .attachment {
      .border-radius(@attachment-border-radius);
      background: #f4f4f4;
      margin-left: 65px;
      margin-right: 15px;
      padding: 10px;
      > h4 {
        margin: 0 0 5px 0;
        font-weight: 600;
        font-size: 14px;
      }
      > p, > .filename {
        font-weight: 600;
        font-size: 13px;
        font-style: italic;
        margin: 0;

      }
      .clearfix();
    }
  }

}
475

Nicolas Widart's avatar
Nicolas Widart committed
476 477 478 479 480
//END CHAT WIDGET

//Input in box
.box-input {
  max-width: 200px;
481 482 483 484 485 486 487 488 489
}

//A fix for panels body text color when placed within
// a modal
.modal {
  .panel-body {
    color: #444;
  }
}