Fixed search input with fixed header
authorAlexander Ebert <ebert@woltlab.com>
Thu, 14 Jul 2016 17:57:26 +0000 (19:57 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Thu, 14 Jul 2016 17:57:35 +0000 (19:57 +0200)
wcfsetup/install/files/style/layout/pageHeaderSticky.scss

index 4dd8994015c4c8f89206fa00269f155394f397f6..c3a103b35115171d600c94087efa3504db4fba46 100644 (file)
                        }
                }
                
-               .pageHeaderSearchInputContainer {
+               &:not(.searchBarOpen) .pageHeaderSearchInputContainer {
                        display: none;
                }
+               
+               &.searchBarOpen .pageHeaderSearchInputContainer {
+                       position: absolute;
+                       
+                       // Regular top calculation does not work because one of the parents
+                       // is set to `position: fixed`, screwing up the entire calculation.
+                       // We can work around this by using a relative top value of 100%
+                       // which equals the total height of the parent container.
+                       top: 100% !important;
+               }
+               
+               
        }
 }