|
25 | 25 | .ui.toast-container {
|
26 | 26 | position: fixed;
|
27 | 27 | z-index: 9999;
|
| 28 | + &.ui.attached when (@variationToastAttached) { |
| 29 | + width: 100%; |
| 30 | + left: 0; |
| 31 | + margin-top: -@toastAttachedMargin; |
| 32 | + & .vertical.attached when (@variationToastVertical) { |
| 33 | + border-radius: 0; |
| 34 | + } |
| 35 | + &.ui.ui .attached.actions .button when (@variationToastActions) { |
| 36 | + border-radius: 0; |
| 37 | + } |
| 38 | + & .toast-box { |
| 39 | + margin-top: -@toastAttachedMargin; |
| 40 | + margin-bottom: 0; |
| 41 | + width: 100%; |
| 42 | + border-radius: 0; |
| 43 | + & > .vertical > .content when (@variationToastVertical) { |
| 44 | + flex: 1; |
| 45 | + } |
| 46 | + & > * { |
| 47 | + width: 100%; |
| 48 | + border-radius: 0; |
| 49 | + & > .vertical:not(.actions) when (@variationToastVertical) { |
| 50 | + flex: 1; |
| 51 | + } |
| 52 | + } |
| 53 | + & > .attached.actions when (@variationToastActions) { |
| 54 | + margin-right: @toastLeftRightMargin; |
| 55 | + } |
| 56 | + } |
| 57 | + &.top when (@variationToastTop) { |
| 58 | + top: 0; |
| 59 | + } |
| 60 | + &.bottom when (@variationToastBottom) { |
| 61 | + bottom: 0; |
| 62 | + } |
| 63 | + } |
28 | 64 | &.top when (@variationToastTop) {
|
29 | 65 | &.right when (@variationToastRight) {
|
30 | 66 | top: @toastContainerDistance;
|
|
88 | 124 | border: @toastBoxBorder;
|
89 | 125 | }
|
90 | 126 | }
|
91 |
| - &.compact, |
92 |
| - > .compact { |
93 |
| - width: @toastWidth; |
| 127 | + & when (@variationToastCompact) { |
| 128 | + &.compact, |
| 129 | + > .compact { |
| 130 | + width: @toastWidth; |
| 131 | + } |
94 | 132 | }
|
95 | 133 | & > .ui.toast,
|
96 | 134 | > .ui.message {
|
|
348 | 386 | border-top-right-radius: 0;
|
349 | 387 | border-bottom-right-radius: 0;
|
350 | 388 | }
|
351 |
| - & .button:not(:first-child):not(:last-child) { |
352 |
| - margin-left: -@toastLeftRightMargin; |
353 |
| - } |
354 | 389 | }
|
355 | 390 | &.message.message.message when (@variationToastMessage) {
|
356 | 391 | border-top-right-radius: @toastBorderRadius;
|
|
426 | 461 | font-size: @toastIconFontSize;
|
427 | 462 | }
|
428 | 463 | &:not(.vertical) {
|
| 464 | + &:not(.centered):not(.center) { |
| 465 | + & > i.icon:not(.close) when (@variationToastIcon) { |
| 466 | + position: absolute; |
| 467 | + } |
| 468 | + & > .ui.image when (@variationToastImage) { |
| 469 | + position: absolute; |
| 470 | + } |
| 471 | + } |
429 | 472 | & > i.icon:not(.close) when (@variationToastIcon) {
|
430 |
| - position: absolute; |
431 | 473 | & + .content {
|
432 | 474 | padding-left: @toastIconContentPadding;
|
433 | 475 | }
|
|
436 | 478 | padding-left: @toastCloseDistance;
|
437 | 479 | }
|
438 | 480 | & > .ui.image when (@variationToastImage) {
|
439 |
| - position: absolute; |
440 | 481 | &.avatar + .content {
|
441 | 482 | padding-left: @toastAvatarImageContentPadding;
|
442 | 483 | min-height: @toastAvatarImageHeight;
|
|
454 | 495 | min-height: @toastSmallImageHeight;
|
455 | 496 | }
|
456 | 497 | }
|
457 |
| - & when (@variationToastImage) or (@variationToastIcon) { |
| 498 | + &:not(.centered):not(.center) when (@variationToastImage) or (@variationToastIcon) { |
458 | 499 | & > .centered.image,
|
459 | 500 | > .centered.icon {
|
460 | 501 | transform: translateY(-50%);
|
|
516 | 557 | margin-right: auto;
|
517 | 558 | }
|
518 | 559 |
|
| 560 | +& when (@variationToastCentered) { |
| 561 | + .ui.ui.toast-container .toast-box .centered.toast, |
| 562 | + .ui.ui.toast-container .toast-box .center.aligned.toast { |
| 563 | + text-align: center; |
| 564 | + display: flex; |
| 565 | + justify-content: center; |
| 566 | + |
| 567 | + & > .content, |
| 568 | + & > .ui.image, |
| 569 | + & > i.icon:not(.close) { |
| 570 | + align-self: center; |
| 571 | + } |
| 572 | + } |
| 573 | + |
| 574 | + .ui.toast-container .toast-box .toast .centered.content, |
| 575 | + .ui.toast-container .toast-box .toast .center.aligned.content { |
| 576 | + text-align: center; |
| 577 | + } |
| 578 | + |
| 579 | + .ui.toast-container .toast-box .centered.actions, |
| 580 | + .ui.toast-container .toast-box .center.aligned.actions { |
| 581 | + text-align: center; |
| 582 | + |
| 583 | + &:not(.attached) > .button:not(.fluid) { |
| 584 | + margin-left: @toastActionCenteredMargin; |
| 585 | + margin-right: @toastActionCenteredMargin; |
| 586 | + } |
| 587 | + } |
| 588 | +} |
| 589 | + |
519 | 590 | /*--------------
|
520 | 591 | Colors
|
521 | 592 | -------------- */
|
|
0 commit comments