facebook.scss 2.96 KB
Newer Older
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 31 32 33 34 35 36 37 38 39 40 41 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 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 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 134 135 136 137 138 139 140 141 142 143 144 145 146
// Facebook Theme for SweetAlert
// By Tristan Edwards

.sweet-overlay {  
  border-radius: 3px;
}


.sweet-alert {
  $header-height: 41px;
  $footer-height: 50px;
  $text-color: #131722;
  $fb-focus: 0 0 1px 2px rgba(88, 144, 255, .75), 0 1px 1px rgba(0, 0, 0, .15) !important;
  $padding: 12px;

  font-family: Helvetica, Arial, 'lucida grande', tahoma, verdana, arial, sans-serif;
  padding: $padding;
  padding-top: $header-height + $padding;
  text-align: right; // Align buttons
  box-shadow: 0px 0px 0px 1px rgba(black, 0.11), 0px 6px 30px rgba(black, 0.14);

  h2 {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: $header-height;
    background-color: #f6f7f8;
    margin: 0;
    font-size: 15px;
    text-align: left;
    padding-left: 12px;
    color: $text-color;
    border-bottom: 1px solid #e5e5e5;
  }

  p {
    display: block;
    text-align: center;
    color: #131722;
    font-weight: 400;
    font-size: 15px;
    margin-top: 7px;
  }

  .sa-button-container {
    border-top: 1px solid #dcdee3;
  }
  &[data-has-confirm-button=false][data-has-cancel-button=false] {
    padding-bottom: 10px;
    .sa-button-container {
      display: none;
    }
  }

  button {
    font-size: 12px;
    padding: 5px 10px;
    border-radius: 2px;
    box-shadow: none !important;
    text-shadow: 0px -1px 0px rgba(black, 0.3);
    font-weight: 500;
    margin: 0;
    margin-top: $padding;
    &:focus, &.cancel:focus {
      box-shadow: $fb-focus;
    }

    &.confirm {
      border: 1px solid #3d5586;
      background-color: #47639c !important;
      margin-left: 4px;
    }
    &.cancel {
      color: #4e5664;
      background-color: #fafbfb;
      text-shadow: 0px -1px 0px white;
      border: 1px solid #c5c6c8;
      box-shadow: 0px 1px 1px rgba(black, 0.04) !important;
      font-weight: 600;
      &:hover {
        background-color: #fafbfb;
      }
    }
  }

  .sa-icon:not(.sa-custom) {
    transform: scale(0.7);
    margin-bottom: -10px;
    margin-top: -10px;
  }

  input {
    border: 1px solid #bdc7d8;
    padding: 3px;
    border-radius: 0;
    box-shadow: none;
    font-size: 15px;
    height: 33px;
    margin: 10px 0;
    &:focus {
      box-shadow: $fb-focus;
    }
  }

  fieldset .sa-input-error {
    display: none;
  }

  .sa-error-container {
    text-align: center;
    background-color: #fdebe8;
    margin: 0;
    border: none;
    &.show {
      margin: 14px;
      margin-top: 0;
      border: 1px solid #d5512d;
    }

    .icon {
      display: none;
    }
    p {
      color: #303b44;
      margin-top: 3px;
    }
  }
}


// Animations

@mixin keyframes($animation-name) {
  @-webkit-keyframes #{$animation-name} {
    @content;
  }
  @keyframes #{$animation-name} {
    @content;
  }
}

@include keyframes(animateErrorIcon) {
  0%    { transform: rotateX(100deg), scale(0.5); -webkit-transform: rotateX(100deg), scale(0.5); opacity: 0; }
  100%  { transform: rotateX(0deg),   scale(0.5); -webkit-transform: rotateX(0deg),   scale(0.5); opacity: 1; }
}