_system-feedback.scss 13.8 KB
Newer Older
Brian Talbot committed
1 2
// studio - elements - system feedback
// alerts, notifications, prompts, and status communication
Brian Talbot committed
3 4
// ====================

5
// shared
6
.wrapper-notification, .wrapper-alert, .prompt {
7
  @include box-sizing(border-box);
8 9

  .copy {
Brian Talbot committed
10
    @extend .t-copy-sub1;
11 12 13 14
  }
}

.wrapper-notification, .wrapper-alert, .prompt {
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
  background: $gray-d3;

  .copy {
    color: $gray-l2;

    .title {
      color: $white;
    }

    .nav-actions {

      .action-primary {
        color: $gray-d4;
      }
    }
  }
}

33
.alert, .notification, .prompt {
34 35 36 37 38 39

  // types - confirm
  &.confirm {

    .nav-actions .action-primary {
      @include blue-button();
Brian Talbot committed
40
      @include font-size(12); // needed due to bad button mixins for now
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
      border-color: $blue-d2;
    }

    a {
      color: $blue;

      &:hover {
        color: $blue-s2;
      }
    }
  }

  // types - warning
  &.warning {

    .nav-actions .action-primary {
      @include orange-button();
Brian Talbot committed
58
      @include font-size(12); // needed due to bad button mixins for now
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76
      border-color: $orange-d2;
      color: $gray-d4;
    }

    a {
      color: $orange;

      &:hover {
        color: $orange-s2;
      }
    }
  }

  // types - error
  &.error {

    .nav-actions .action-primary {
      @include red-button();
Brian Talbot committed
77
      @include font-size(12); // needed due to bad button mixins for now
78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94
      border-color: $red-d2;
    }

    a {
      color: $red-l1;

      &:hover {
        color: $red;
      }
    }
  }

  // types - announcement
  &.announcement {

    .nav-actions .action-primary {
      @include blue-button();
Brian Talbot committed
95
      @include font-size(12); // needed due to bad button mixins for now
96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112
      border-color: $blue-d2;
    }

    a {
      color: $blue;

      &:hover {
        color: $blue-s2;
      }
    }
  }

  // types - confirmation
  &.confirmation {

    .nav-actions .action-primary {
      @include green-button();
Brian Talbot committed
113
      @include font-size(12); // needed due to bad button mixins for now
114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130
      border-color: $green-d2;
    }

    a {
      color: $green;

      &:hover {
        color: $green-s2;
      }
    }
  }

  // types - step required
  &.step-required {

    .nav-actions .action-primary {
      @include pink-button();
Brian Talbot committed
131 132
      @include font-size(12); // needed due to bad button mixins for now
      border-color: $pink-d2;
133 134 135 136 137 138 139 140 141 142 143 144
    }

    a {
      color: $pink;

      &:hover {
        color: $pink-s1;
      }
    }
  }
}

145 146
// prompts
.wrapper-prompt {
147
  @extend .depth5;
148
  @include transition(all 0.05s ease-in-out);
149 150
  position: fixed;
  top: 0;
151
  background: $black-t0;
152 153 154 155 156 157 158
  width: 100%;
  height: 100%;
  text-align: center;

  &:before {
    content: '';
    display: inline-block;
159
    height: 100%;
160 161 162 163 164
    vertical-align: middle;
    margin-right: -0.25em; /* Adjusts for spacing */
  }

  .prompt {
165 166
    @include border-radius(($baseline/5));
    @include box-shadow(0 0 3px $shadow-d1);
167 168
    display: inline-block;
    vertical-align: middle;
169 170 171 172 173 174 175 176
    width: $baseline*17.5;
    border: 4px solid $black;
    text-align: left;

    .copy {
      border-top: 4px solid $blue;
      padding: $baseline;
    }
177 178

    .nav-actions {
179 180 181 182
      @include box-shadow(inset 0 1px 2px $shadow-d1);
      border-top: 1px solid $black-t1;
      padding: ($baseline*0.75) $baseline;
      background: $gray-d4;
183 184

      .nav-item {
185 186
        display: inline-block;
        margin-right: ($baseline*0.75);
187

188 189 190 191 192 193
        &:last-child {
          margin-right: 0;
        }
      }

      .action-primary {
Brian Talbot committed
194
        @extend .t-action4;
195
        font-weight: 600;
196
      }
197 198

      .action-secondary {
Brian Talbot committed
199
        @extend .t-action4;
200 201 202 203 204 205 206
      }
    }
  }

  // types of prompts - error
  .prompt.error {

207
    [class^="icon"] {
208 209 210 211 212 213 214 215 216 217 218
      color: $red-l1;
    }

    .copy {
      border-top-color: $red-l1;
    }
  }

  // types of prompts - confirmation
  .prompt.confirmation {

219
    [class^="icon"] {
220 221 222 223 224 225 226 227 228 229 230
      color: $green;
    }

    .copy {
      border-top-color: $green;
    }
  }

  // types of prompts - error
  .prompt.warning {

231
    [class^="icon"] {
232 233 234 235 236
      color: $orange;
    }

    .copy {
      border-top-color: $orange;
237 238 239 240
    }
  }
}

241 242
// ====================

Brian Talbot committed
243 244
// notifications
.wrapper-notification {
245
  @extend .depth5;
Brian Talbot committed
246
  @include clearfix();
247
  @include box-shadow(0 -1px 3px $shadow, inset 0 3px 1px $blue);
Brian Talbot committed
248
  position: fixed;
249
  bottom: 0;
Brian Talbot committed
250
  width: 100%;
251
  padding: $baseline ($baseline*2);
Brian Talbot committed
252 253

  &.wrapper-notification-warning {
254
    @include box-shadow(0 -1px 3px $shadow, inset 0 3px 1px $orange);
255

256
    [class^="icon"] {
257 258
      color: $orange;
    }
Brian Talbot committed
259 260
  }

261
  &.wrapper-notification-error {
262
    @include box-shadow(0 -1px 3px $shadow, inset 0 3px 1px $red-l1);
263

264
    [class^="icon"] {
265 266
      color: $red-l1;
    }
Brian Talbot committed
267 268
  }

269
  &.wrapper-notification-confirmation {
270
    @include box-shadow(0 -1px 3px $shadow, inset 0 3px 1px $green);
271

272
    [class^="icon"] {
273 274 275 276
      color: $green;
    }
  }

277
  &.wrapper-notification-saving {
278
    @include box-shadow(0 -1px 3px $shadow, inset 0 3px 1px $pink);
279
  }
280

281 282
  // shorter/status notifications
  &.wrapper-notification-status {
283
    @include border-top-radius(3px);
284
    width: ($baseline*8);
285
    right: ($baseline);
286
    border: 4px solid $black;
287
    border-bottom: none;
288 289 290 291 292 293 294 295 296
    padding: ($baseline/2) $baseline;

    .notification {
      @include box-sizing(border-box);
      @include clearfix();
      width: 100%;
      max-width: none;
      min-width: none;

297
      [class^="icon"], .copy {
298 299 300 301 302
        float: none;
        display: inline-block;
        vertical-align: middle;
      }

303
      [class^="icon"] {
304
        width: $baseline;
305
        height: ($baseline*1.25);
306
        margin-right: ($baseline*0.75);
307
        line-height: 3rem;
308 309 310
      }

      .copy {
311

312
      }
313
    }
Brian Talbot committed
314
  }
315

316
  // help notifications
317
  &.wrapper-notification-help {
318
    @include border-top-radius(3px);
319 320
    width: ($baseline*14);
    right: ($baseline);
321
    border: 4px solid $black;
322
    border-bottom: none;
323
    padding: $baseline;
324 325 326 327 328 329 330 331

    .notification {
      @include box-sizing(border-box);
      @include clearfix();
      width: 100%;
      max-width: none;
      min-width: none;

332
      [class^="icon"] {
333 334 335 336
        width: $baseline;
        margin-right: ($baseline*0.75);
      }

337 338 339 340
      .action-notification-close {
        right: 0;
      }

341
      .copy {
342
        width: ($baseline*10);
343
      }
344
    }
345
  }
Brian Talbot committed
346 347 348 349
}

.notification {
  @include box-sizing(border-box);
350
  @include clearfix();
Brian Talbot committed
351 352 353 354 355
  margin: 0 auto;
  width: flex-grid(12);
  max-width: $fg-max-width;
  min-width: $fg-min-width;

356 357 358 359
  strong {
    font-weight: 700;
  }

360
  [class^="icon"], .copy {
Brian Talbot committed
361
    float: left;
362 363
    display: inline-block;
    vertical-align: middle;
364 365
  }

366
  [class^="icon"] {
367
    @include transition (color 0.5s ease-in-out);
368
    @include font-size(22);
369
    width: flex-grid(1, 12);
370
    height: ($baseline*1.25);
Brian Talbot committed
371
    margin-top: ($baseline/4);
Brian Talbot committed
372
    margin-right: flex-gutter();
373 374 375 376 377
    text-align: right;
    color: $white;
  }

  .copy {
Brian Talbot committed
378
    @extend .t-copy-sub1;
379 380
    width: flex-grid(10, 12);
    color: $gray-l2;
Brian Talbot committed
381

382
    .title {
Brian Talbot committed
383
      @extend .t-title7;
384 385 386 387 388 389 390
      margin-bottom: 0;
      color: $white;
    }
  }

  // with actions
  &.has-actions {
391

392
    [class^="icon"] {
393 394 395 396 397 398 399 400 401 402 403
      width: flex-grid(1, 12);
    }

    .copy {
      width: flex-grid(7, 12);
      margin-right: flex-gutter();
    }

    .nav-actions {
      width: flex-grid(4, 12);
      float: right;
404
      margin-top: ($baseline/4);
405 406 407 408 409 410 411 412 413 414
      text-align: right;

      .nav-item {
        display: inline-block;
        vertical-align: middle;
        margin-right: ($baseline/2);

        &:last-child {
          margin-right: 0;
        }
415 416
      }
    }
417

418 419 420 421 422
    .action-primary {
      @include blue-button();
      border-color: $blue-d2;
      font-weight: 600;
    }
423

424
    .action-secondary {
425

Brian Talbot committed
426
      @extend .t-action4;
427 428 429 430 431
    }
  }

  &.confirmation {

432 433 434
    .copy {
      margin-top: ($baseline/5);
    }
Brian Talbot committed
435
  }
436 437 438

  &.saving {

439
    [class^="icon"] {
440
      @include anim-rotateClockwise(3s, linear, infinite);
441 442 443
      width: 25px;
      margin: -4px 10px 0 0;
      @include transform-origin(52% 60%);
444
    }
445 446

    .copy p {
447
      @extend .text-sr;
448
    }
449
  }
Brian Talbot committed
450 451 452 453 454 455
}

// ====================

// alerts
.wrapper-alert {
Brian Talbot committed
456
  @extend .depth2;
Brian Talbot committed
457
  @include box-sizing(border-box);
458
  @include box-shadow(0 1px 1px $white, inset 0 2px 2px $shadow-d1, inset 0 -4px 1px $blue);
Brian Talbot committed
459 460 461
  position: relative;
  overflow: hidden;
  width: 100%;
462
  border-top: 1px solid $black;
463
  padding: $baseline ($baseline*2) ($baseline*1.5) ($baseline*2);
464
  background: $gray-d3;
Brian Talbot committed
465

466 467 468 469 470 471 472 473
  // needed since page load is very slow
  display: none;

  // needed since page load is very slow
  &.is-shown {
    display: block;
  }

Brian Talbot committed
474
  &.wrapper-alert-warning {
475
    @include box-shadow(0 1px 1px $white, inset 0 2px 2px $shadow-d1, inset 0 -4px 1px $orange);
476

477
    [class^="icon"] {
478 479
      color: $orange;
    }
Brian Talbot committed
480 481 482
  }

  &.wrapper-alert-error {
483
    @include box-shadow(0 1px 1px $white, inset 0 2px 2px $shadow-d1, inset 0 -4px 1px $red-l1);
484

485
    [class^="icon"] {
486
      color: $red-l1;
487
    }
Brian Talbot committed
488 489
  }

490
  &.wrapper-alert-confirmation {
491
    @include box-shadow(0 1px 1px $white, inset 0 2px 2px $shadow-d1, inset 0 -4px 1px $green);
492

493
    [class^="icon"] {
494 495 496 497 498
      color: $green;
    }
  }

  &.wrapper-alert-announcement {
499
    @include box-shadow(0 1px 1px $white, inset 0 2px 2px $shadow-d1, inset 0 -4px 1px $blue);
500

501
    [class^="icon"] {
502 503
      color: $blue;
    }
Brian Talbot committed
504 505
  }

506
  &.wrapper-alert-step-required {
507
    @include box-shadow(0 1px 1px $white, inset 0 2px 2px $shadow-d1, inset 0 -4px 1px $pink);
508

509
    [class^="icon"] {
510 511
      color: $pink;
    }
Brian Talbot committed
512 513 514
  }
}

515
// adopted alerts
516
.alert {
Brian Talbot committed
517
  @include box-sizing(border-box);
518
  @include clearfix();
Brian Talbot committed
519 520 521 522 523 524 525 526 527 528
  margin: 0 auto;
  width: flex-grid(12);
  max-width: $fg-max-width;
  min-width: $fg-min-width;
  color: $white;

  strong {
    font-weight: 700;
  }

529
  [class^="icon"], .copy {
530 531 532
    float: left;
  }

533
  [class^="icon"] {
534
    @include transition (color 0.5s ease-in-out);
535
    @include font-size(22);
536
    width: flex-grid(1, 12);
537
    margin: ($baseline/4) flex-gutter() 0 0;
538 539 540
    text-align: right;
  }

Brian Talbot committed
541
  .copy {
542 543
    width: flex-grid(10, 12);
    color: $gray-l2;
Brian Talbot committed
544

545
    .title {
Brian Talbot committed
546
      @extend .t-title7;
547 548
      margin-bottom: 0;
      color: $white;
Brian Talbot committed
549 550 551
    }
  }

552
  // with actions
Brian Talbot committed
553
  &.has-actions {
554

555
    [class^="icon"] {
556 557 558
      width: flex-grid(1, 12);
    }

Brian Talbot committed
559
  	.copy {
560
  		width: flex-grid(7, 12);
Brian Talbot committed
561 562 563
  		margin-right: flex-gutter();
  	}

564
  	.nav-actions {
565
  	  width: flex-grid(4, 12);
566 567
      float: right;
      margin-top: ($baseline/2);
Brian Talbot committed
568 569
  	  text-align: right;

570
  	  .nav-item {
Brian Talbot committed
571 572 573 574 575 576 577
  	    display: inline-block;
  	    vertical-align: middle;
  	    margin-right: ($baseline/2);

  	    &:last-child {
  	      margin-right: 0;
  	    }
578 579

        .action-primary {
Brian Talbot committed
580
          @extend .t-action4;
581 582 583 584
          font-weight: 600;
        }

        .action-secondary {
Brian Talbot committed
585
          @extend .t-action4;
586
        }
Brian Talbot committed
587 588 589 590
  	  }
  	}
  }

591 592
  // with cancel
  .action-alert-close {
593
    @include border-bottom-radius(($baseline/5));
594 595 596 597
    position: absolute;
    top: -($baseline/10);
    right: $baseline;
    padding: ($baseline/4) ($baseline/2) 0 ($baseline/2);
598
    background: $gray-d4;
599 600 601
    text-align: center;

    .label {
602
      @extend .text-sr;
603 604
    }

605
    [class^="icon"] {
606 607 608 609 610 611 612 613
      @include font-size(14);
      color: $white;
      width: auto;
      margin: 0;
      padding: 2px;
    }

    &:hover {
614
      background: $gray-d1;
615 616
    }
  }
617 618
}

619 620
// ====================

621 622 623
// js enabled
.js {

624
  // prompt set-up
625
  .wrapper-prompt {
626 627
    visibility: hidden;
    pointer-events: none;
628 629

    .prompt {
630
      opacity: 0.0;
631
    }
632
  }
633

634
  // prompt showing/hiding
635
  &.prompt-is-shown {
636

637 638 639
    .wrapper-view {
      -webkit-filter: blur(2px) grayscale(25%);
      filter: blur(2px) grayscale(25%);
640 641
    }

642 643 644
    .wrapper-prompt.is-shown {
      visibility: visible;
      pointer-events: auto;
645 646

      .prompt {
647 648
        @include anim-bounceIn(0.5s);
        opacity: 1.0;
649
      }
650 651 652
    }
  }

653
  // alert showing/hiding
654 655 656 657 658 659 660 661
  .wrapper-alert {
    display: none;

    &.is-shown {
      display: block;
    }
  }

662
  // notification showing/hiding
663
  .wrapper-notification {
664
    bottom: -($notification-height);
665

666
    // varying animations
667
    &.is-shown {
668
      @include anim-notificationsSlideUp(1s);
669 670 671
    }

    &.is-hiding {
672
      @include anim-notificationsSlideDown(0.25s);
673
    }
674 675 676
  }
}

677 678
// ====================

679 680 681 682 683 684 685 686 687 688 689 690 691
// temporary
body.uxdesign.alerts {

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

  .content-primary {
    @extend .window;
    width: flex-grid(12, 12);
    margin-right: flex-gutter();
    padding: $baseline ($baseline*1.5);
692

693 694 695 696 697 698 699 700
    > section {
      margin-bottom: ($baseline*2);

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

701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722
    ul {

      li {
        @include clearfix();
        width: flex-grid(12, 12);
        margin-bottom: ($baseline/4);
        border-bottom: 1px solid $gray-l4;
        padding-bottom: ($baseline/4);

        &:last-child {
          margin-bottom: 0;
          border-bottom: none;
          padding-bottom: 0;
        }

        a {
          float: left;
          width: flex-grid(5, 12);
          margin-right: flex-gutter();
        }
      }
    }
723 724 725
  }
}

726 727
// ====================

Brian Talbot committed
728
// artifact styles
729 730 731 732 733 734 735 736 737
.main-wrapper {
  .alert {
    padding: 15px 20px;
    margin-bottom: 30px;
    border-radius: 3px;
    border: 1px solid #edbd3c;
    border-radius: 3px;
    background: #fbf6e1;
    // background: #edbd3c;
Brian Talbot committed
738
    font-size: 14px;
739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781
    @include clearfix;

    .alert-message {
      float: left;
      margin: 4px 0 0 0;
      color: $gray-d3;
    }

    strong {
      font-weight: 700;
    }

    .alert-action {
      float: right;

      &.secondary {
        @include orange-button;
      }
    }
  }
}

body.error {
	background: $gray-d4;
	color: $gray-d3;

	.primary-header {
		display: none;
	}

	.error-prompt {
		width: 700px;
		margin: 150px auto;
		padding: 60px 50px 90px;
		border-radius: 3px;
		background: $white;
		text-align: center;
	}

	h1 {
		float: none;
		margin: 0;
		font-size: 60px;
782
		font-weight: 300;
783 784 785 786 787 788 789 790 791 792 793 794 795 796
		color: $gray-d3;
	}

	.description {
		margin-bottom: 50px;
		font-size: 21px;
	}

	.back-button {
		@include blue-button;
		padding: 14px 40px 18px;
		font-size: 18px;
	}
}