1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-25 23:10:57 +01:00
phorge-phorge/webroot/rsrc/css/aphront/lightbox-attachment.css
epriestley d984a3ffa4 Use CSS to resize the lightboxed image instead of Javascript
Summary: We can let the browser do the scaling with some simpler CSS rules.

Test Plan: Opened very large images in Safari, Firefox and Chrome and resized the browser. Observed smooth scaling and no issues with the image overlapping UI elements, etc.

Reviewers: btrahan, vrana

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T1896

Differential Revision: https://secure.phabricator.com/D3802
2012-10-23 12:09:59 -07:00

109 lines
2.1 KiB
CSS

/**
* @provides lightbox-attachment-css
*/
.lightbox-attached {
overflow: hidden;
}
.lightbox-attachment {
position: fixed;
top: 0;
left: 0;
bottom: 0;
right: 0;
z-index: 12;
overflow-y: auto;
}
.lightbox-attachment img {
margin: 3% auto 0;
max-height: 90%;
max-width: 90%;
}
.lightbox-attachment .loading {
position: absolute;
top: -9999px;
}
.lightbox-attachment .attachment-name {
width: 100%;
color: #F2F2F2;
line-height: 30px;
text-align: center;
}
.lightbox-attachment .lightbox-status {
background: #010101;
color: #F2F2F2;
line-height: 30px;
position: fixed;
bottom: 0px;
width: 100%;
}
.lightbox-attachment .lightbox-status .lightbox-status-txt {
padding: 0px 0px 0px 20px;
}
.lightbox-attachment .lightbox-status .lightbox-download {
padding: 0px 20px 0px 0px;
float: right;
}
.lightbox-attachment .lightbox-status .lightbox-download
.lightbox-download-form {
display: inline;
}
.lightbox-attachment .lightbox-status .lightbox-download
.lightbox-download-form button {
border: 0;
background: #010101;
}
.lightbox-attachment .lightbox-status .lightbox-download
.lightbox-download-form button:hover {
background: #333;
}
.lightbox-attachment .lightbox-close {
top: 22px;
right: 20px;
position: fixed;
display: block;
height: 26px;
width: 26px;
background: url('/rsrc/image/icon/lightbox/close-2.png');
}
.lightbox-attachment .lightbox-close:hover {
background: url('/rsrc/image/icon/lightbox/close-hover-2.png');
}
.lightbox-attachment .lightbox-left {
top: 46%;
left: 20px;
position: fixed;
display: block;
height: 38px;
width: 21px;
background: url('/rsrc/image/icon/lightbox/left-arrow-2.png');
}
.lightbox-attachment .lightbox-left:hover {
background: url('/rsrc/image/icon/lightbox/left-arrow-hover-2.png');
}
.lightbox-attachment .lightbox-right {
top: 46%;
right: 20px;
position: fixed;
display: block;
height: 38px;
width: 21px;
background: url('/rsrc/image/icon/lightbox/right-arrow-2.png');
}
.lightbox-attachment .lightbox-right:hover {
background: url('/rsrc/image/icon/lightbox/right-arrow-hover-2.png');
}