vh yo
This commit is contained in:
Zixaphir 2013-06-20 19:48:12 -07:00
parent 8490850939
commit bddfa28665
4 changed files with 5 additions and 15 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -647,6 +647,9 @@ th {
max-width: 100%;
width: 100%;
}
.fit-height .full-image {
max-height: 95vh;
}
.images-overlap-post-form .full-image {
position: relative;
z-index: 21;

View File

@ -56,19 +56,6 @@ ImageExpand =
return
setFitness: ->
(if @checked then $.addClass else $.rmClass) doc, @name.toLowerCase().replace /\s+/g, '-'
<% if (type === 'userjs') { %>
# XXX Opera doesn't support CSS vh.
return unless @name is 'Fit height'
if @checked
$.on window, 'resize', ImageExpand.resize
unless ImageExpand.style
ImageExpand.style = $.addStyle null
ImageExpand.resize()
else
$.off window, 'resize', ImageExpand.resize
resize: ->
ImageExpand.style.textContent = ":root.fit-height .full-image {max-height:#{doc.clientHeight}px}"
<% } %>
toggle: (post) ->
{thumb} = post.file