Work-around for a rounding error in Safari
authorAlexander Ebert <ebert@woltlab.com>
Fri, 23 Sep 2016 14:07:07 +0000 (16:07 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Fri, 23 Sep 2016 14:07:13 +0000 (16:07 +0200)
wcfsetup/install/files/style/ui/attachment.scss

index e127d6dc0b573b84f3fcf43a6f8269851b24ec48..5936cba685abdb059b1b4f367149a43847c093cb 100644 (file)
                        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;
                        }
                }