workaround for Safari, version 2; tested in Midori

This commit is contained in:
Jesse D. McDonald 2020-04-17 17:41:25 -05:00
parent baaff7a8c3
commit ada365b76f
1 changed files with 5 additions and 6 deletions

View File

@ -1075,12 +1075,11 @@ $(function (){
* This breaks the CSS that should be ensuring a 1:1 aspect ratio. * This breaks the CSS that should be ensuring a 1:1 aspect ratio.
*/ */
function fixSafariPadding() { function fixSafariPadding() {
let elements = $('#cb_container, #cb_board'); let squares = $('#cb_board .cb-square');
for (let element of elements) { for (let square of squares) {
element = $(element); square = $(square);
const width = element.width(); const width = square.width();
const topPadding = width; square.css('height', width + 'px');
element.css('padding-top', topPadding + 'px');
} }
} }