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

4 5
// Table of Contents
// * +Basic Setup
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
// * +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
22
// ====================
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

31
  min-width: $fg-min-width;
Chris Rodriguez committed
32 33
  background: $uxpl-grayscale-x-back;
  color: $gray-d3;
34 35
}

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

42 43
// removing the outline on any element that we make programmatically focusable
[tabindex="-1"] {
44
  outline: none;
45
}
46

47
a {
48
  @include transition(color $tmg-f2 ease-in-out 0s);
49

50
  text-decoration: none;
51
  color: theme-color("primary");
52

53
  &:hover {
54
    color: $uxpl-blue-hover-active;
55
  }
56 57 58
}

h1 {
59
  @extend %t-title4;
60
  @extend %t-light;
61 62
}

63
.waiting {
64
  opacity: 0.1;
65 66
}

Tom Giannattasio committed
67
.page-actions {
68
  margin-bottom: ($baseline*1.5);
Tom Giannattasio committed
69 70
}

71 72 73
.wrapper {
  @include clearfix();
  @include box-sizing(border-box);
74

75 76 77
  width: 100%;
}

78
// +Typography - Basic
79
// ====================
Brian Talbot committed
80
.page-header {
81
  @extend %t-title3;
82
  @extend %t-strong;
83

Brian Talbot committed
84
  display: block;
85
  color: $gray-d3;
Brian Talbot committed
86

87 88
  .navigation,
  .subtitle {
89
    @extend %t-title7;
90
    @extend %t-regular;
91

Brian Talbot committed
92 93 94
    position: relative;
    top: ($baseline/4);
    display: block;
95
    color: $gray-d2;
Brian Talbot committed
96 97 98 99
  }
}

.section-header {
100
  @extend %t-title4;
101
  @extend %t-strong;
Brian Talbot committed
102 103

  .subtitle {
104
    @extend %t-title7;
Brian Talbot committed
105 106 107 108
  }
}

.area-header {
109
  @extend %t-title6;
110
  @extend %t-strong;
Brian Talbot committed
111 112

  .subtitle {
113
    @extend %t-title8;
Brian Talbot committed
114 115 116 117
  }
}

.area-subheader {
118
  @extend %t-title7;
119
  @extend %t-strong;
Brian Talbot committed
120 121

  .subtitle {
122
    @extend %t-title9;
Brian Talbot committed
123 124 125
  }
}

126
// +Typography - Primary Content
127
// ====================
Brian Talbot committed
128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161
.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;
    }
  }
}

162
// +Typography - Secondary Content
163
// ====================
Brian Talbot committed
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
.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;
    }
  }
}

190
// +Typography - Loose Headings  (BT: needs to be removed once html is clean)
191
// ====================
192 193 194 195 196 197
.title-1,
.title-2,
.title-3,
.title-4,
.title-5,
.title-6 {
198
  @extend %t-strong;
199 200 201
}

.title-1 {
202
  @extend %t-title3;
203

204 205 206 207
  margin-bottom: ($baseline*1.5);
}

.title-2 {
208
  @extend %t-title4;
209

210 211 212 213
  margin-bottom: $baseline;
}

.title-3 {
214
  @extend %t-title5;
215

216 217 218 219
  margin-bottom: ($baseline/2);
}

.title-4 {
220
  @extend %t-title7;
221
  @extend %t-regular;
222

223 224 225 226
  margin-bottom: $baseline;
}

.title-5 {
227
  @extend %t-title7;
228
  @extend %t-regular;
229

230 231 232 233 234
  color: $gray-l1;
  margin-bottom: $baseline;
}

.title-6 {
235
  @extend %t-title7;
236
  @extend %t-regular;
237

238 239 240 241
  color: $gray-l2;
  margin-bottom: $baseline;
}

242 243 244 245
p,
ul,
ol,
dl {
246 247 248 249 250 251 252
  margin-bottom: ($baseline/2);

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

253
// +Layout - Basic Page Header
254
// ====================
Mathew Peterson committed
255 256 257 258 259 260 261
.wrapper-mast {
  margin: ($baseline*1.5) 0 0 0;
  padding: 0 $baseline;
  position: relative;

  .mast, .metadata {
    @include clearfix();
262

Mathew Peterson committed
263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284
    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 {
285 286
        @include float(left);
        @include margin-right(flex-gutter());
287 288

        width: flex-grid(6, 12);
Mathew Peterson committed
289 290 291
      }

      .nav-actions {
292 293
        @include float(left);
        @include text-align(right);
294

Mathew Peterson committed
295 296
        position: relative;
        bottom: -($baseline*0.75);
297
        width: flex-grid(6, 12);
Mathew Peterson committed
298 299 300 301

        .nav-item {
          display: inline-block;
          vertical-align: top;
302

303
          @include margin-right($baseline/2);
Mathew Peterson committed
304 305

          &:last-child {
306
            @include margin-right(0);
Mathew Peterson committed
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
          }
        }

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

    // 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;
332

Mathew Peterson committed
333 334 335 336 337 338
        display: inline-block;
        vertical-align: bottom; // correct for extra padding in FF
        max-width: 250px;

        &.navigation-current {
          @extend %ui-disabled;
339

Mathew Peterson committed
340 341 342
          color: $gray;
          max-width: 250px;

343
          &::before {
Mathew Peterson committed
344 345 346 347 348
            color: $gray;
          }
        }
      }

349
      .navigation-link::before {
Mathew Peterson committed
350 351 352 353 354 355 356 357 358
        content: " / ";
        margin: ($baseline/4);
        color: $gray;

        &:hover {
          color: $gray;
        }
      }

359
      .navigation .navigation-link:first-child::before {
Mathew Peterson committed
360 361 362 363 364 365 366 367 368 369
        content: "";
        margin: 0;
      }
    }
  }

  // CASE: wizard-based mast
  .mast-wizard {
    .page-header-sub {
      @extend %t-title4;
370

Mathew Peterson committed
371 372 373 374 375 376
      color: $gray;
      font-weight: 300;
    }

    .page-header-super {
      @extend %t-title4;
377

Mathew Peterson committed
378
      float: left;
379
      width: flex-grid(12, 12);
Mathew Peterson committed
380 381 382 383 384 385 386 387 388 389 390 391 392
      margin-top: ($baseline/2);
      border-top: 1px solid $gray-l4;
      padding-top: ($baseline/2);
      font-weight: 600;
    }
  }

  // page metadata/action bar
  .metadata {

  }
}

393
// +Layout - Basic Page Content
394
// ====================
Mathew Peterson committed
395 396 397 398 399 400 401 402
.wrapper-content {
  margin: 0;
  padding: 0 $baseline;
  position: relative;
}

.content {
  @include clearfix();
403

Mathew Peterson committed
404
  @extend %t-copy-base;
405

Mathew Peterson committed
406 407 408 409 410 411 412 413 414 415 416 417 418 419
  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;
420

Mathew Peterson committed
421 422 423 424 425 426 427
      display: block;
      margin: 0;
      color: $gray-l2;
    }

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

Mathew Peterson committed
429 430 431 432 433 434 435 436 437 438 439 440
      margin: 0;
      padding: 0;
      font-weight: 600;
      color: $gray-d3;
    }
  }
}

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

441
// +Layout - Primary Content
442
// ====================
Mathew Peterson committed
443 444 445 446 447 448 449
.content-primary {
  .title-1 {
    @extend %t-title3;
  }

  .title-2 {
    @extend %t-title4;
450

Mathew Peterson committed
451 452 453 454 455
    margin: 0 0 ($baseline/2) 0;
  }

  .title-3 {
    @extend %t-title6;
456

Mathew Peterson committed
457 458 459 460 461 462 463 464 465 466 467 468 469 470
    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;
471

472 473
      @include text-align(right);
      @include float(right);
474

Mathew Peterson committed
475 476
      width: flex-grid(7, 12);
      margin-top: ($baseline/2);
477
      color: $gray-d1;
Mathew Peterson committed
478 479 480 481
    }
  }
}

482
// +Layout - Supplemental Content
483
// ====================
Mathew Peterson committed
484 485 486 487 488 489
.content-supplementary {
  > section {
    margin: 0 0 $baseline 0;
  }
}

490
// +Layout - Grandfathered
491
// ====================
Mathew Peterson committed
492 493 494 495 496 497 498
.main-wrapper {
  position: relative;
  margin: 0 ($baseline*2);
}

.inner-wrapper {
  @include clearfix();
499

Mathew Peterson committed
500 501 502 503 504 505 506 507 508 509 510
  position: relative;
  max-width: 1280px;
  margin: auto;

  > article {
    clear: both;
  }
}

.main-column {
  clear: both;
511

512
  @include float(left);
513

Mathew Peterson committed
514 515 516 517
  width: 70%;
}

.sidebar {
518
  @include float(right);
519

Mathew Peterson committed
520 521 522 523
  width: 28%;
}

.left {
524
  @include float(left);
Mathew Peterson committed
525 526 527
}

.right {
528
  @include float(right);
Mathew Peterson committed
529
}
530

531
// +UI - Actions
532
// ====================
533
.new-unit-item,
534 535
.new-subsection-item,
.new-policy-item {
536
  @include grey-button();
537

538
  @extend %t-action5;
539

540 541
  margin: ($baseline/2);
  padding: 3px ($baseline/2) 4px ($baseline/2);
542 543 544 545 546 547 548

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

551
.item-actions {
552 553
  position: absolute;
  top: 5px;
554

555
  @include right(5px);
556 557 558 559 560 561 562 563 564 565

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

566
// +UI - Misc
567
// ====================
568
hr.divide {
569
  @extend %cont-text-sr;
570 571 572
}

.item-details {
573 574
  float: left;
  padding: ($baseline/2) 0;
575 576
}

577
.details {
578 579 580 581
  @extend %t-copy-sub1;

  display: none;
  margin-bottom: ($baseline*1.5);
582 583
}

584
.window {
585 586 587
  .window-contents {
    padding: 20px;
  }
Calen Pennington committed
588

589
  .header {
590 591
    @include linear-gradient(top, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0));

592
    @extend %t-title7;
593

594 595 596 597
    padding: 6px 14px;
    border-bottom: 1px solid $mediumGrey;
    border-radius: 2px 2px 0 0;
    background-color: $lightBluishGrey;
598
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2) inset;
599 600
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.3);
  }
Calen Pennington committed
601

602 603 604
  label {
    display: block;
    margin-bottom: 6px;
605

606
    @extend %t-strong;
Calen Pennington committed
607

608 609
    &.inline-label {
      display: inline;
610 611
    }

612
    .description {
613
      @extend %t-copy-sub2;
614
      @extend %t-regular;
615

616 617 618
      display: block;
      font-style: italic;
      color: #999;
Calen Pennington committed
619
    }
620
  }
Calen Pennington committed
621

622
  .row {
623 624
    margin-bottom: ($baseline/2);
    padding-bottom: ($baseline/2);
625 626
    border-bottom: 1px solid #cbd1db;
  }
627 628
}

629
// +Utility - Basic
630
// ====================
631 632

// UI - semantically hide text
633
.sr, .sr-only {
634
  @extend %cont-text-sr;
635 636
}

637
// UI - faking a link's behavior
638
.fake-link {
639 640 641 642 643 644
  @extend %ui-fake-link;
}

// UI - disabled
.is-disabled {
  @extend %ui-disabled;
645 646
}

647
// ui - semantic + visual divider
648
hr.divider {
649
  @extend %cont-text-sr;
650 651
}

652
// ui - skipnav
653 654
.nav-skip,
.transcript-skip {
655
  @extend %t-action3;
656

657
  display: inline-block;
658
  position: absolute;
659
  left: 0;
660 661 662 663 664 665
  top: -($baseline*30);
  overflow: hidden;
  background: $white;
  border-bottom: 1px solid $gray-l4;
  padding: ($baseline*0.75) ($baseline/2);

666 667 668 669
  &:focus,
  &:active {
    position: relative;
    top: auto;
670 671
    width: auto;
    height: auto;
672
    margin: 0;
673
  }
674 675
}

676 677 678 679
// lean/simple modal window
.content-modal {
  @include border-bottom-radius(2px);
  @include box-sizing(border-box);
680

681 682 683 684 685 686 687 688
  position: relative;
  display: none;
  width: 700px;
  padding: ($baseline);
  border: 1px solid $gray-d1;
  background: $white;
  box-shadow: 0 2px 4px $shadow-d1;
  overflow: hidden;
689

690 691 692
  .action-modal-close {
    @include transition(top $tmg-f3 ease-in-out 0s);
    @include border-bottom-radius(3px);
693

694 695 696 697 698 699 700 701 702
    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;
703 704
    }

705 706
    .icon {
      @extend %t-action1;
707

708
      color: $white;
709 710
    }

711 712
    &:hover,
    &:active {
713
      top: 0;
714
      background: theme-color("primary");
715
    }
716
  }
717

718 719
  img {
    @include box-sizing(border-box);
720

721 722 723 724 725 726 727 728 729
    width: 100%;
    overflow-y: scroll;
    padding: ($baseline/10);
    border: 1px solid $gray-l4;
  }

  .title {
    @extend %t-title5;
    @extend %t-strong;
730

731 732 733 734 735 736
    margin: 0 0 ($baseline/2) 0;
    color: $gray-d3;
  }

  .description {
    @extend %t-copy-sub2;
737

738 739
    margin-top: ($baseline/2);
    color: $gray-l1;
740 741
  }
}