aboutsummaryrefslogtreecommitdiffstats
path: root/src/styles/image-upload.scss
blob: 06176a7af0ee274069e715bbdaaa75e17ed69e04 (plain) (blame)
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
.image-upload {
  position: absolute;
  width: 140px;
  height: 140px;
  border: 1px solid $theme-gray-lighter;
  border-radius: $theme-border-radius-small;
  background: $theme-gray-lightest;
  overflow: hidden;
  margin-top: 5px;

  &__preview,
  &__action {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
  }

  &__preview {
    z-index: 1;
    background-size: cover;
    background-size: 100%;
    background-repeat: no-repeat;
    background-position: center center;
    border-radius: 3px;
  }

  &__action {
    position: relative;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.5s;
    display: flex;
    justify-content: center;

    &-background {
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: rgba($theme-gray, 0.7);
      z-index: 10;
    }

    button {
      position: relative;
      z-index: 100;
      color: #FFF;

      .mdi {
        color: #FFF;
      }
    }
  }

  &__dropzone {
    text-align: center;
    border-radius: 5px;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
  }

  &__dropzone, 
  button {
    .mdi {
      margin-bottom: 5px;
    }

    p {
      font-size: 10px;
      line-height: 10px;
    }
  }

  &:hover {
    .image-upload__action {
      opacity: 1;
    }
  }
}

.image-upload-wrapper {
  .mdi {
    font-size: 40px;
    color: $theme-gray-light;
  }
}