UNPKG

metro4

Version:

The front-end framework for Build responsive, mobile-first projects on the web with the first front-end component library in Metro Style

138 lines (119 loc) 2.8 kB
@import (once) "include/vars"; @import (once) "include/mixins"; .img-container, .img-fluid, .img-thumbnail { width: 100%; max-width: 100%; height: auto; display: block; position: relative; vertical-align: middle; background-color: @transparent; transition: @transition-base; overflow: visible; } .img-thumbnail { padding: .25rem; border: 1px solid @borderColor; border-radius: @borderRadius; background-color: @white; } .img-container { display: block; img { width: 100%; max-width: 100%; height: auto; position: relative; } .image-overlay { position: absolute; top: 0; bottom: 0; left: 0; right: 0; opacity: 0; overflow: hidden; font-size: .875rem; line-height: 1rem; padding: 2em; background-color: rgba(red(@cyan), green(@cyan), blue(@cyan), .7); color: @white; text-align: center; border-radius: inherit; transition: @transition-base; * { color: @white; } &:hover { opacity: 1; &:before, &:after { opacity: 1; transform: scale(1); } } &:before, &:after { display: block; position: absolute; content: ""; border: 1px solid rgba(255, 255, 255, 0.7); top: 1em; bottom: 1em; left: 1em; right: 1em; opacity: 0; border-radius: inherit; transform: scale(1.5); transition: @transition-base; } &:after { border-left: none; border-right: none; bottom: 1em; top: 1em; } &:before { border-top: none; border-bottom: none; bottom: 1em; top: 1em; } } &.rounded { img { border-radius: @borderRadius; } } &.thumbnail { padding: .25rem; border: 1px solid @borderColor; //border-radius: @borderRadius; background-color: @white; .title { font-size: .9rem; line-height: 1; } } img + .title { margin-top: .25rem; } .title + img { margin-top: .25rem; } &.cover { background-size: cover; background: no-repeat 100% 100%; } } figure { margin: 0 0 1rem; img { width: 100%; max-width: 100%; height: auto; display: block; position: relative; vertical-align: middle; background-color: @transparent; transition: @transition-base; } }