Advertisement
Guest User

Untitled

a guest
Apr 7th, 2020
349
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 6.21 KB | None | 0 0
  1. $color: (
  2.     'primary': #F1592A,
  3.     'gray-200': #edf2f7,
  4.     'gray-400': #cbd5e0,
  5. );
  6.  
  7. $timing-next: 800ms;
  8. $timing-back: 600ms;
  9. $easing: cubic-bezier(.2, 0, .2, 1);
  10.  
  11. $button: (
  12.     'border-width': 2px,
  13.     'border-radius': 4px,
  14.     'font-weight': 500,
  15.     'shadow': unquote('0 10px 15px -3px rgba(0, 0, 0, 0.2), 0 4px 6px -2px rgba(0, 0, 0, 0.05)'),
  16.     'theme': (
  17.         'primary': map-get($color, 'primary'),
  18.     ),
  19. );
  20.  
  21.  
  22. @mixin button-theme($background, $foreground) {
  23.     $theme-base:          $background;
  24.     $theme-hover-color:   darken($background, 6%);
  25.     $theme-active-color:  darken($background, 12%);
  26.     $disabled-color:        #dbdbdb;
  27.  
  28.     color: $foreground;
  29.     background-color: $theme-base;
  30.     border-color: $theme-base;
  31.  
  32.     &:focus {
  33.         background-color: $theme-hover-color;
  34.         border-color: $theme-hover-color;
  35.     }
  36.  
  37.     &:hover {
  38.         background-color: $theme-hover-color;
  39.         border-color: $theme-hover-color;
  40.     }
  41.  
  42.     &:active {
  43.         background-color: $theme-active-color;
  44.         border-color: $theme-active-color;
  45.     }
  46.  
  47.     &.button-outlined {
  48.         color: $theme-base;
  49.         border-color: currentColor;
  50.  
  51.         &,
  52.         &:hover,
  53.         &:active {
  54.             color: $theme-base;
  55.             background-color: rgba(0, 0, 0, 0);
  56.         }
  57.  
  58.         &:hover,
  59.         &:focus {
  60.             background-color: rgba($theme-base, .15);
  61.         }
  62.  
  63.         &:active {
  64.             color: white;
  65.             background-color: $theme-base;
  66.             border-color: $theme-base;
  67.         }
  68.     }
  69.  
  70.     &:disabled,
  71.     &.disabled {
  72.         &,
  73.         &:hover,
  74.         &:active,
  75.         &:focus {
  76.             border-color: $disabled-color;
  77.             background-color: $disabled-color;
  78.         }
  79.     }
  80. }
  81.  
  82. html {
  83.     color: #343a4a;
  84. }
  85.  
  86. .container {
  87.     max-width: 1024px;
  88. }
  89.  
  90. .main {
  91.     position: relative;
  92.     height: 400px;
  93. }
  94.  
  95. .file-drop {
  96.     display: flex;
  97.     justify-content: space-between;
  98.     align-items: center;
  99.     flex-direction: column;
  100.     width: 100%;
  101.     height: 100%;
  102.     min-height: 180px;
  103.     border-width: 3px;
  104.     border-style: dashed;
  105.     border-color: map-get($color, 'gray-400');
  106.     background-color: map-get($color, 'gray-200');
  107.     transition: background-color 160ms ease, border-color 400ms ease;
  108.  
  109.     &.dragover {
  110.         background-color: lighten(map-get($color, 'primary'), 40%);
  111.     }
  112. }
  113.  
  114. svg,
  115. .svg {
  116.     height: 100%;
  117.     width: 100%;
  118. }
  119.  
  120. .svg-index {
  121.     position: relative;
  122.     z-index: -2;
  123. }
  124.  
  125. .svg-success {
  126.     display: flex;
  127.     flex-direction: column;
  128.    
  129.     svg {
  130.         flex-grow: 1;
  131.         flex-basis: 0;
  132.     }
  133. }
  134.  
  135.  
  136. .button {
  137.     min-width: 170px;
  138.     min-height: 42px;
  139.     padding: 0 14px;
  140.     font-size: 1rem;
  141.  
  142.     @include button-theme(map-get(map-get($button, 'theme'), 'primary'), white);
  143.  
  144.     position: relative;
  145.     display: inline-flex;
  146.     justify-content: center;
  147.     align-items: center;
  148.     flex: 0 0 auto;
  149.     border-radius: map-get($button, 'border-radius');
  150.     border: map-get($button, 'border-width') solid;
  151.     border-color: transparent;
  152.     font-weight: map-get($button, 'font-weight');
  153.     line-height: 1;
  154.     user-select: none;
  155.     touch-action: manipulation;
  156.     box-shadow: map-get($button, 'shadow');
  157.  
  158.     overflow: hidden;
  159.     white-space: nowrap;
  160.     text-overflow: ellipsis;
  161.  
  162.     transition: background-color 160ms,
  163.                 color 160ms,
  164.                 box-shadow 160ms,
  165.                 border 160ms;
  166.  
  167.     &:disabled {
  168.         box-shadow: none;
  169.     }
  170.  
  171.     &:focus {
  172.         outline: none;
  173.     }
  174. }
  175.  
  176. .button-iconed-left {
  177.     i,
  178.     span {
  179.         margin-right: .6em;
  180.     }
  181. }
  182.  
  183.  
  184. .spinner {
  185.     display: inline-block;
  186.     margin: 0 8px;
  187.     border-radius: 50%;
  188.     width: 1.5em;
  189.     height: 1.5em;
  190.     border: .215em solid transparent;
  191.     font-size: 16px;
  192.     border-top-color: white;
  193.     animation-name: spin;
  194.     animation-duration: 1s;
  195.     animation-iteration-count: infinite;
  196.     animation-timing-function: cubic-bezier(.55, .15, .45, .85);
  197. }
  198.  
  199.  
  200. .index,
  201. .success,
  202. .title,
  203. .svg {
  204.     opacity: 1;
  205.     transition: opacity $timing-next $easing;
  206. }
  207.  
  208. .view-bg {
  209.     position: absolute;
  210.     top: 0;
  211.     right: 0;
  212.     left: 0;
  213.     bottom: 0;
  214.     z-index: -1;
  215.     background-color: map-get($color, 'gray-200');
  216.     transform-origin: left center;
  217.     transition-property: transform;
  218.     transition-timing-function: $easing;
  219. }
  220.  
  221. .index-bg {
  222.     transform: scale(.5, 1);
  223. }
  224.  
  225. .v-view-next-leave-active {
  226.     .title {
  227.         animation: fade-in $timing-next $easing reverse;
  228.     }
  229.  
  230.     .index-bg {
  231.         transform: scale(1, 1);
  232.         transition-duration: $timing-next;
  233.     }
  234.  
  235.     .file-drop {
  236.         border-color: map-get($color, 'gray-200');
  237.     }
  238.  
  239.     .index,
  240.     .svg-index {
  241.         animation: fade-in $timing-next $easing reverse;
  242.     }
  243. }
  244.  
  245. .v-view-next-enter-active {
  246.     .title {
  247.         animation: fade-in $timing-next $easing;
  248.     }
  249.  
  250.     .success {
  251.         animation: fade-in $timing-next $easing;
  252.     }
  253. }
  254.  
  255. .v-view-back-enter-active {
  256.     .title {
  257.         animation: fade-in $timing-back $easing;
  258.     }
  259.  
  260.     .index,
  261.     .svg-index {
  262.         animation: fade-in $timing-back $easing;
  263.     }
  264. }
  265.  
  266. .v-view-back-leave-active {
  267.     .title {
  268.         animation: fade-in $timing-back $easing reverse;
  269.     }
  270.  
  271.     .success {
  272.         animation: fade-in $timing-back $easing reverse;
  273.     }
  274.  
  275.     .success-bg {
  276.         transform: scale(.5, 1);
  277.         transition-duration: $timing-back;
  278.     }
  279. }
  280.  
  281.  
  282. .v-view-next-enter-active {
  283.     animation: no-animation $timing-next $easing;
  284. }
  285. .v-view-next-leave-active {
  286.     animation: no-animation $timing-next $easing;
  287. }
  288. .v-view-back-enter-active {
  289.     animation: no-animation $timing-back $easing;
  290. }
  291. .v-view-back-leave-active {
  292.     animation: no-animation $timing-back $easing;
  293. }
  294.  
  295.  
  296. @keyframes no-animation {
  297.     0% {
  298.         opacity: 1;
  299.     }
  300.  
  301.     100% {
  302.         opacity: 1;
  303.     }
  304. }
  305. @keyframes fade-in {
  306.     0% {
  307.         opacity: 0;
  308.     }
  309.  
  310.     100% {
  311.         opacity: 1;
  312.     }
  313. }
  314. @keyframes spin {
  315.     0% {
  316.         transform: rotate(0deg);
  317.     }
  318.  
  319.     100% {
  320.         transform: rotate(360deg);
  321.     }
  322. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement