_base.scss 11.8 KB
Newer Older
1
// studio - base styling
2
// ====================
3

4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
// Table of Contents 
// * +Basic Setup 
// * +Typography - Basic
// * +Typography - Primary Content
// * +Typography - Secondary Content
// * +Typography - Loose Headings
// * +Layout - Basic
// * +Layout - Basic Page Header
// * +Layout - Basic Page Content
// * +Layout - Primary Content
// * +Layout - Supplemental Content
// * +Layout - Grandfathered
// * +UI - Actions
// * +UI - Misc
// * +Utility - Basic
// * +JS Dependent

// +Basic Setup
// ==================== 
23 24
html {
  font-size: 62.5%;
25
  height: 102%; // force scrollbar to prevent jump when scroll appears, cannot use overflow because it breaks drag
26 27
}

28
body {
29
  @extend %t-copy-base;
30
  min-width: $fg-min-width;
31
  background: $gray-l5;
Brian Talbot committed
32
  color: $gray-d2;
33 34
}

35
body, input, button {
36
  font-family: 'Open Sans', sans-serif;
37 38
}

39
a {
40
  @include transition(color $tmg-f2 ease-in-out 0s);
41 42
  text-decoration: none;
  color: $blue;
43

44
  &:hover {
45
    color: $orange-d1;
46
  }
47 48 49
}

h1 {
50
  @extend %t-title4;
51
  @extend %t-light;
52 53
}

54
.waiting {
55
  opacity: 0.1;
56 57
}

Tom Giannattasio committed
58
.page-actions {
59
  margin-bottom: ($baseline*1.5);
Tom Giannattasio committed
60 61
}

62 63 64 65 66 67
.wrapper {
  @include clearfix();
  @include box-sizing(border-box);
  width: 100%;
}

68 69
// +Typography - Basic
// ==================== 
Brian Talbot committed
70
.page-header {
71
  @extend %t-title3;
72
  @extend %t-strong;
Brian Talbot committed
73
  display: block;
74
  color: $gray-d3;
Brian Talbot committed
75

76
  .navigation, .subtitle {
77
    @extend %t-title7;
78
    @extend %t-regular;
Brian Talbot committed
79 80 81 82 83 84 85 86
    position: relative;
    top: ($baseline/4);
    display: block;
    color: $gray-l2;
  }
}

.section-header {
87
  @extend %t-title4;
88
  @extend %t-strong;
Brian Talbot committed
89 90

  .subtitle {
91
    @extend %t-title7;
Brian Talbot committed
92 93 94 95
  }
}

.area-header {
96
  @extend %t-title6;
97
  @extend %t-strong;
Brian Talbot committed
98 99

  .subtitle {
100
    @extend %t-title8;
Brian Talbot committed
101 102 103 104
  }
}

.area-subheader {
105
  @extend %t-title7;
106
  @extend %t-strong;
Brian Talbot committed
107 108

  .subtitle {
109
    @extend %t-title9;
Brian Talbot committed
110 111 112
  }
}

113 114
// +Typography - Primary Content
// ==================== 
Brian Talbot committed
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
.content-primary {

  .section-header {
    color: $gray-d3;

    .subtitle {
      color: $gray-l2;
    }
  }

  .content-header {
    color: $gray-d3;

    .subtitle {
      color: $gray-l2;
    }
  }

  .area-header {
    color: $gray-d3;

    .subtitle {
      color: $gray-l2;
    }
  }

  .area-subheader {
    color: $gray-d3;

    .subtitle {
      color: $gray-l2;
    }
  }
}

150 151
// +Typography - Secondary Content
// ==================== 
Brian Talbot committed
152 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
.content-secondary {

  .section-header {
    color: $gray-d3;

    .subtitle {
      color: $gray-l2;
    }
  }

  .content-header {
    color: $gray-d3;

    .subtitle {
      color: $gray-l2;
    }
  }

  .content-header {
    color: $gray-d3;

    .subtitle {
      color: $gray-l2;
    }
  }
}

179 180
// +Typography - Loose Headings  (BT: needs to be removed once html is clean)
// ==================== 
Brian Talbot committed
181
.title-1, .title-2, .title-3, .title-4, .title-5, .title-6 {
182
  @extend %t-strong;
183 184 185
}

.title-1 {
186
  @extend %t-title3;
187 188 189 190
  margin-bottom: ($baseline*1.5);
}

.title-2 {
191
  @extend %t-title4;
192 193 194 195
  margin-bottom: $baseline;
}

.title-3 {
196
  @extend %t-title5;
197 198 199 200
  margin-bottom: ($baseline/2);
}

.title-4 {
201
  @extend %t-title7;
202
  @extend %t-regular;
203 204 205 206
  margin-bottom: $baseline;
}

.title-5 {
207
  @extend %t-title7;
208
  @extend %t-regular;
209 210 211 212 213
  color: $gray-l1;
  margin-bottom: $baseline;
}

.title-6 {
214
  @extend %t-title7;
215
  @extend %t-regular;
216 217 218 219
  color: $gray-l2;
  margin-bottom: $baseline;
}

220 221 222 223 224 225 226 227
p, ul, ol, dl {
  margin-bottom: ($baseline/2);

  &:last-child {
    margin-bottom: 0;
  }
}

228 229
// +Layout - Basic
// ==================== 
Mathew Peterson committed
230 231 232 233
.wrapper-view {

}

234 235
// +Layout - Basic Page Header
// ==================== 
Mathew Peterson committed
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
.wrapper-mast {
  margin: ($baseline*1.5) 0 0 0;
  padding: 0 $baseline;
  position: relative;

  .mast, .metadata {
    @include clearfix();
    position: relative;
    max-width: $fg-max-width;
    min-width: $fg-min-width;
    width: flex-grid(12);
    margin: 0 auto $baseline auto;
    color: $gray-d2;
  }

  .mast {
    border-bottom: 1px solid $gray-l4;
    padding-bottom: ($baseline/2);

    // layout with actions
    .page-header {
      width: flex-grid(12);
    }

    // layout with actions
    &.has-actions {
      @include clearfix();

      .page-header {
265 266
        @include float(left);
        @include margin-right(flex-gutter());
267
        width: flex-grid(6,12);
Mathew Peterson committed
268 269 270
      }

      .nav-actions {
271 272
        @include float(left);
        @include text-align(right);
Mathew Peterson committed
273 274 275 276 277 278 279
        position: relative;
        bottom: -($baseline*0.75);
        width: flex-grid(6,12);

        .nav-item {
          display: inline-block;
          vertical-align: top;
280
          @include margin-right($baseline/2);
Mathew Peterson committed
281 282

          &:last-child {
283
            @include margin-right(0);
Mathew Peterson committed
284 285 286 287 288 289 290 291 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 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 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
          }
        }

        // buttons
        .button {
          padding: ($baseline/4) ($baseline/2) ($baseline/3) ($baseline/2);
        }

        .new-button {

        }

        .view-button {

        }
      }
    }

    // layout with actions
    &.has-subtitle {

      .nav-actions {
        bottom: -($baseline*1.5);
      }
    }

    // layout with navigation
    &.has-navigation {

      .nav-actions {
        bottom: -($baseline*1.5);
      }

      .navigation-link {
        @extend %cont-truncated;
        display: inline-block;
        vertical-align: bottom; // correct for extra padding in FF
        max-width: 250px;

        &.navigation-current {
          @extend %ui-disabled;
          color: $gray;
          max-width: 250px;

          &:before {
            color: $gray;
          }
        }
      }

      .navigation-link:before {
        content: " / ";
        margin: ($baseline/4);
        color: $gray;

        &:hover {
          color: $gray;
        }
      }

      .navigation .navigation-link:first-child:before {
        content: "";
        margin: 0;
      }
    }
  }

  // CASE: wizard-based mast
  .mast-wizard {

    .page-header-sub {
      @extend %t-title4;
      color: $gray;
      font-weight: 300;
    }

    .page-header-super {
      @extend %t-title4;
      float: left;
      width: flex-grid(12,12);
      margin-top: ($baseline/2);
      border-top: 1px solid $gray-l4;
      padding-top: ($baseline/2);
      font-weight: 600;
    }
  }

  // page metadata/action bar
  .metadata {

  }
}

377 378
// +Layout - Basic Page Content
// ==================== 
Mathew Peterson committed
379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420
.wrapper-content {
  margin: 0;
  padding: 0 $baseline;
  position: relative;
}

.content {
  @include clearfix();
  @extend %t-copy-base;
  max-width: $fg-max-width;
  min-width: $fg-min-width;
  width: flex-grid(12);
  margin: 0 auto;
  color: $gray-d2;

  header {
    position: relative;
    margin-bottom: $baseline;
    border-bottom: 1px solid $gray-l4;
    padding-bottom: ($baseline/2);

    .title-sub {
      @extend %t-copy-sub1;
      display: block;
      margin: 0;
      color: $gray-l2;
    }

    .title-1 {
      @extend %t-title3;
      margin: 0;
      padding: 0;
      font-weight: 600;
      color: $gray-d3;
    }
  }
}

.content-primary, .content-supplementary {
  @include box-sizing(border-box);
}

421 422
// +Layout - Primary Content
// ==================== 
Mathew Peterson committed
423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458
.content-primary {

  .title-1 {
    @extend %t-title3;
  }

  .title-2 {
    @extend %t-title4;
    margin: 0 0 ($baseline/2) 0;
  }

  .title-3 {
    @extend %t-title6;
    margin: 0 0 ($baseline/2) 0;
  }

  header {
    @include clearfix();

    .title-2 {
      width: flex-grid(5, 12);
      margin: 0 flex-gutter() 0 0;
      float: left;
    }

    .tip {
      @extend %t-copy-sub2;
      width: flex-grid(7, 12);
      float: right;
      margin-top: ($baseline/2);
      text-align: right;
      color: $gray-l2;
    }
  }
}

459 460
// +Layout - Supplemental Content
// ==================== 
Mathew Peterson committed
461 462 463 464 465 466 467
.content-supplementary {

  > section {
    margin: 0 0 $baseline 0;
  }
}

468 469
// +Layout - Grandfathered
// ==================== 
Mathew Peterson committed
470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487
.main-wrapper {
  position: relative;
  margin: 0 ($baseline*2);
}

.inner-wrapper {
  @include clearfix();
  position: relative;
  max-width: 1280px;
  margin: auto;

  > article {
    clear: both;
  }
}

.main-column {
  clear: both;
488
  @include float(left);
Mathew Peterson committed
489 490 491 492
  width: 70%;
}

.sidebar {
493
  @include float(right);
Mathew Peterson committed
494 495 496 497
  width: 28%;
}

.left {
498
  @include float(left);
Mathew Peterson committed
499 500 501
}

.right {
502
  @include float(right);
Mathew Peterson committed
503
}
504

505 506
// +UI - Actions
// ==================== 
507
.new-unit-item,
508 509
.new-subsection-item,
.new-policy-item {
510 511
  @include grey-button();
  @extend %t-action5;
512 513
  margin: ($baseline/2);
  padding: 3px ($baseline/2) 4px ($baseline/2);
514 515 516 517 518 519 520

  .new-folder-icon,
  .new-policy-icon,
  .new-unit-icon {
    position: relative;
    top: 2px;
  }
521 522
}

523
.item-actions {
524 525
  position: absolute;
  top: 5px;
526
  @include right(5px);
527 528 529 530 531 532 533 534 535 536

  .edit-button,
  .delete-button,
  .visibility-toggle {
    float: left;
    margin-right: 13px;
    color: #a4aab7;
  }
}

537 538
// +UI - Misc
// ==================== 
539
hr.divide {
540
  @extend %cont-text-sr;
541 542 543
}

.item-details {
Calen Pennington committed
544
    float: left;
545
    padding: ($baseline/2) 0;
546 547
}

548
.details {
549
    @extend %t-copy-sub1;
550
    display: none;
551
    margin-bottom: ($baseline*1.5);
552 553
}

554
.window {
555 556 557 558

  .window-contents {
    padding: 20px;
  }
Calen Pennington committed
559

560
  .header {
561
    @include linear-gradient(top, rgba(255, 255, 255, .4), rgba(255, 255, 255, 0));
562
    @extend %t-title7;
563 564 565 566
    padding: 6px 14px;
    border-bottom: 1px solid $mediumGrey;
    border-radius: 2px 2px 0 0;
    background-color: $lightBluishGrey;
567
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2) inset;
568 569
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.3);
  }
Calen Pennington committed
570

571 572 573
  label {
    display: block;
    margin-bottom: 6px;
574
    @extend %t-strong;
Calen Pennington committed
575

576 577
    &.inline-label {
      display: inline;
578 579
    }

580
    .description {
581
      @extend %t-copy-sub2;
582
      @extend %t-regular;
583 584 585
      display: block;
      font-style: italic;
      color: #999;
Calen Pennington committed
586
    }
587
  }
Calen Pennington committed
588

589
  .row {
590 591
    margin-bottom: ($baseline/2);
    padding-bottom: ($baseline/2);
592 593
    border-bottom: 1px solid #cbd1db;
  }
594 595
}

596
.tooltip {
597
  @include transition(opacity $tmg-f3 ease-out 0s);
598
  @include font-size(12);
599
  @extend %t-regular;
600
  @extend %ui-depth5;
601 602 603 604 605 606 607
  position: absolute;
  top: 0;
  left: 0;
  padding: 0 10px;
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.85);
  line-height: 26px;
608
  color: $white;
609
  pointer-events: none;
610
  opacity: 0.0;
611 612

  &:after {
613
    @include font-size(20);
614
    content: '▾';
615 616 617 618 619 620 621
    display: block;
    position: absolute;
    bottom: -14px;
    left: 50%;
    margin-left: -7px;
    color: rgba(0, 0, 0, 0.85);
  }
622 623
}

624

625 626
// +Utility - Basic
// ==================== 
627 628

// UI - semantically hide text
629
.sr {
630
  @extend %cont-text-sr;
631 632
}

633
// UI - faking a link's behavior
634
.fake-link {
635 636 637 638 639 640
  @extend %ui-fake-link;
}

// UI - disabled
.is-disabled {
  @extend %ui-disabled;
641 642
}

643
// ui - semantic + visual divider
644
hr.divider {
645
  @extend %cont-text-sr;
646 647
}

648 649
// ui - skipnav
.nav-skip {
650
  @extend %t-action3;
651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666
  display: block;
  position: absolute;
  left: 0px;
  top: -($baseline*30);
  width: 1px;
  height: 1px;
  overflow: hidden;
  background: $white;
  border-bottom: 1px solid $gray-l4;
  padding: ($baseline*0.75) ($baseline/2);

  &:focus, &:active {
    position: static;
    width: auto;
    height: auto;
  }
667 668
}

669 670 671 672 673 674 675 676 677 678 679 680
// lean/simple modal window
.content-modal {
  @include border-bottom-radius(2px);
  @include box-sizing(border-box);
  position: relative;
  display: none;
  width: 700px;
  padding: ($baseline);
  border: 1px solid $gray-d1;
  background: $white;
  box-shadow: 0 2px 4px $shadow-d1;
  overflow: hidden;
681

682 683 684 685 686 687 688 689 690 691 692 693
  .action-modal-close {
    @include transition(top $tmg-f3 ease-in-out 0s);
    @include border-bottom-radius(3px);
    position: absolute;
    top: -3px;
    right: $baseline;
    padding: ($baseline/4) ($baseline/2) 0 ($baseline/2);
    background: $gray-l3;
    text-align: center;

    .label {
      @extend %cont-text-sr;
694 695
    }

696 697 698
    .icon {
      @extend %t-action1;
      color: $white;
699 700
    }

701 702 703
    &:hover {
      top: 0;
      background: $blue;
704
    }
705
  }
706

707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725
  img {
    @include box-sizing(border-box);
    width: 100%;
    overflow-y: scroll;
    padding: ($baseline/10);
    border: 1px solid $gray-l4;
  }

  .title {
    @extend %t-title5;
    @extend %t-strong;
    margin: 0 0 ($baseline/2) 0;
    color: $gray-d3;
  }

  .description {
    @extend %t-copy-sub2;
    margin-top: ($baseline/2);
    color: $gray-l1;
726 727
  }
}
728