Use the translateZ hack for Safari only
authorAlexander Ebert <ebert@woltlab.com>
Mon, 16 Jan 2017 14:45:39 +0000 (15:45 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Mon, 16 Jan 2017 14:45:48 +0000 (15:45 +0100)
wcfsetup/install/files/style/bootstrap/mixin/hacks.scss [new file with mode: 0644]
wcfsetup/install/files/style/layout/pageHeader.scss

diff --git a/wcfsetup/install/files/style/bootstrap/mixin/hacks.scss b/wcfsetup/install/files/style/bootstrap/mixin/hacks.scss
new file mode 100644 (file)
index 0000000..81d652a
--- /dev/null
@@ -0,0 +1,9 @@
+/* See https://github.com/saadeghi/browser-hack-sass-mixins */
+/*--- Only Safari ≥ 9 (Non iOS) ---*/
+@mixin only_safari_no_ios($selector, $map){
+       _:-webkit-full-screen:not(:root:root),#{$selector} {
+               @each $property, $value in ($map) {
+                       #{$property}: $value;
+               }
+       }
+}
index 1aaa2e1f46c481487b208d32e2f3cbb63d3714b3..f89c6cbc90963d664729a9fdce1cf3f75fe9a792 100644 (file)
                                height: 50px;
                                padding: 0 15px;
                                
-                               /* fix flicker in Safari on dropdown menu hover */
-                               transform: translateZ(0);
-                               
                                > span {
                                        flex: 0 0 auto;
                                }
        }
 }
 
+/* Hack for a font rendering issue in Safari on menu hover */
+@include only_safari_no_ios('.pageHeaderPanel > .layoutBoundary', (transform: translateZ(0)));
+
 /* user panel */
 .userPanel {
        flex: 0 0 auto;
                                padding: 0 15px;
                                position: relative;
                                
-                               /* fix flicker in Safari on dropdown menu hover */
-                               transform: translateZ(0);
-                               
                                /* hide icon label */
                                > span:not(.icon):not(.badge) {
                                        display: none;