app/assets/stylesheets/binda/components/fileupload.scss in binda-0.1.3 vs app/assets/stylesheets/binda/components/fileupload.scss in binda-0.1.4

- old
+ new

@@ -1,21 +1,19 @@ // see https://tympanus.net/codrops/2015/09/15/styling-customizing-file-inputs-smart-way/ -.fileupload--preview -{ +.fileupload--preview { position: relative; float: left; width: 120px; height: 120px; margin-right: 16px; - transition: all .5s ease; + transition: all 0.5s ease; border: 1px solid $color-gray-lighter; background-repeat: no-repeat; background-position: left top; background-size: contain; - p - { + p { position: absolute; top: 50%; left: 50%; padding: 8px; transform: translate(-50%, -50%); @@ -25,106 +23,91 @@ video { display: none; } } -.fileupload--preview--uploaded -{ - animation: fadePreview .6s ease-out; +.fileupload--preview--uploaded { + animation: fadePreview 0.6s ease-out; border: 0; - p - { + p { display: none; } video { - display: block + display: block; } } -@keyframes fadePreview -{ - from - { - opacity: .01; +@keyframes fadePreview { + from { + opacity: 0.01; } - to - { + to { opacity: 1; } } -.fileupload--dashboard -{ +.fileupload--dashboard { float: left; - .control-label-wrap - { + .control-label-wrap { float: left; } } -.fileupload input -{ +.fileupload input { position: absolute; z-index: -1; overflow: hidden; width: 1px; // .1px didn't work so set minimum to 1px height: 1px; // .1px didn't work so set minimum to 1px opacity: 0; } -.fileupload label.control-label -{ +.fileupload label.control-label { @extend .b-btn; @extend .p; font-weight: 300; margin-right: 20px; margin-bottom: 20px; cursor: pointer; /* "hand" cursor */ - * - { + * { pointer-events: none; } // &.control-label--focus { // outline: 1px dotted #000; - // outline: -webkit-focus-ring-color auto 5px; + // outline: -webkit-focus-ring-color auto 5px; // } } // Override the real .from-group containing the input -.fileupload .form-group -{ +.fileupload .form-group { padding: 0; border: 0; } -.fileupload--remove-image-btn -{ +.fileupload--remove-image-btn { float: left; - transition: all .3s ease; + transition: all 0.3s ease; opacity: 1; } -.fileupload--remove-image-btn--hidden -{ +.fileupload--remove-image-btn--hidden { pointer-events: none; opacity: 0; } -.fileupload--details -{ +.fileupload--details { float: left; - transition: opacity .3s ease-out; + transition: opacity 0.3s ease-out; opacity: 1; } -.fileupload--details--hidden -{ +.fileupload--details--hidden { pointer-events: none; opacity: 0; width: 0; // Odd but needed, otherwise it occupies few transparent pixels... display: none; } @@ -133,6 +116,6 @@ display: none; } .standard-form--image .fileupload--videolink { display: none; -} \ No newline at end of file +}