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.
|
||||
*/
|
||||
function fixSafariPadding() {
|
||||
let elements = $('#cb_container, #cb_board');
|
||||
for (let element of elements) {
|
||||
element = $(element);
|
||||
const width = element.width();
|
||||
const topPadding = width;
|
||||
element.css('padding-top', topPadding + 'px');
|
||||
let squares = $('#cb_board .cb-square');
|
||||
for (let square of squares) {
|
||||
square = $(square);
|
||||
const width = square.width();
|
||||
square.css('height', width + 'px');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue