formstone
Version:
Library of modular front end components.
212 lines (163 loc) • 3.14 kB
text/less
/**
* @component
* @name Viewer
*/
/**
* @class
* @name .fs-viewer-element
* @type element
* @description Target elmement
*/
/**
* @class
* @name .fs-viewer
* @type element
* @description Base widget class
*/
@import "imports/utils.less";
// Transition
@fs-viewer-transition-duration: 0.25s;
@fs-viewer-transition-timing: ease;
// Viewport
@fs-viewer-viewport-position: 30px;
// Wrapper
@fs-viewer-wrapper-background: #fff;
@fs-viewer-z-index: 1;
// Container
// Controls
@fs-viewer-controls-size: 20px;
@fs-viewer-controls-background: #eee;
.fs-viewer {
/**
* @class
* @name .fs-viewer-source
* @type element
* @description Source image element
*/
&-source {
display: none ;
}
/**
* @class
* @name .fs-viewer-wrapper
* @type element
* @description Viewer wrapper
*/
&-wrapper {
position: relative;
background: @fs-viewer-wrapper-background;
overflow: hidden;
transition: none;
height: 300px;
}
/**
* @class
* @name .fs-viewer-viewport
* @type element
* @description Viewer viewport
*/
&-viewport {
position: absolute;
top: @fs-viewer-viewport-position;
right: @fs-viewer-viewport-position;
bottom: @fs-viewer-viewport-position;
left: @fs-viewer-viewport-position;
}
/**
* @class
* @name .fs-viewer-container
* @type element
* @description Image container
*/
&-container {
width: 1px;
height: 1px;
position: absolute;
margin: 0;
opacity: 1;
transform: translate3D(0, 0, 0);
transition: opacity @fs-viewer-transition-duration @fs-viewer-transition-timing;
}
// Loading
&-loading &-container {
opacity: 0;
}
/**
* @class
* @name .fs-viewer-image
* @type element
* @description Image element
*/
&-image {
position: absolute;
}
// Scaling
&-scaling &-container {
transition: none ;
}
&-scaling &-image {
transition: none ;
}
/**
* @class
* @name .fs-viewer-controls
* @type element
* @description Controls container
*/
&-controls {
background: @fs-viewer-controls-background;
margin: 0 auto;
}
/**
* @class
* @name .fs-viewer-control
* @type element
* @description Control element
*/
&-control {
.fs_button;
}
/**
* @class
* @name .fs-viewer-control_previous
* @type element
* @description Previous control
*/
/**
* @class
* @name .fs-viewer-control_next
* @type element
* @description Next control
*/
&-control_previous,
&-control_next {
display: none;
}
&-control_previous {
}
&-control_next {
}
&-gallery &-control_previous,
&-gallery &-control_next {
display: inline;
}
/**
* @class
* @name .fs-viewer-control_zoom_in
* @type element
* @description Zoom in control
*/
/**
* @class
* @name .fs-viewer-control_zoom_out
* @type element
* @description Zoom out control
*/
&-control_zoom_in,
&-control_zoom_out {
}
&-control_zoom_out {
}
&-control_zoom_in {
}
}