workaround for Safari, version 2; tested in Midori
This commit is contained in:
parent
baaff7a8c3
commit
ada365b76f
|
|
@ -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');
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue