From ca4b5f74097b0fa8201efb4e1e08470514bece09 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Fri, 23 Sep 2016 16:07:07 +0200 Subject: [PATCH] Work-around for a rounding error in Safari --- wcfsetup/install/files/style/ui/attachment.scss | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/wcfsetup/install/files/style/ui/attachment.scss b/wcfsetup/install/files/style/ui/attachment.scss index e127d6dc0b..5936cba685 100644 --- a/wcfsetup/install/files/style/ui/attachment.scss +++ b/wcfsetup/install/files/style/ui/attachment.scss @@ -138,8 +138,12 @@ margin-right: -20px; > li { - flex: 0 0 calc(50% - 20px); - max-width: calc(50% - 20px); /* IE fix */ + /* Safari sometimes trips over fractional values, causing two + items to be exactly 1 pixel wider than the available space. + Reserving 21px covers all sort of rounding errors, without + being visually noticeable */ + flex: 0 0 calc(50% - 21px); + max-width: calc(50% - 21px); /* IE fix */ margin-right: 20px; } } -- 2.20.1