From a1bdd02fca413cdc314137dc65e835131c358e72 Mon Sep 17 00:00:00 2001 From: Stefan Malzner Date: Sun, 12 Nov 2017 19:12:29 +0100 Subject: [wip] add icon upload --- src/styles/image-upload.scss | 52 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 src/styles/image-upload.scss (limited to 'src/styles/image-upload.scss') diff --git a/src/styles/image-upload.scss b/src/styles/image-upload.scss new file mode 100644 index 000000000..764bb3158 --- /dev/null +++ b/src/styles/image-upload.scss @@ -0,0 +1,52 @@ +.image-upload { + position: absolute; + width: 100px; + height: 100px; + border-radius: $theme-border-radius; + overflow: hidden; + + &__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; + margin: 5px; + } + + &__action { + position: relative; + z-index: 10; + opacity: 0; + transition: opacity 0.5s; + + &-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; + } + } + + &:hover { + .image-upload__action { + opacity: 1; + } + } +} \ No newline at end of file -- cgit v1.2.3-54-g00ecf