Fix wrong page title positioning in Safari - #1233
Merged
Merged
Conversation
NGPixel
approved these changes
Nov 19, 2019
jionggyu
pushed a commit
to jionggyu/wiki-2.5.302-patch
that referenced
this pull request
Jul 9, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1221.
The issue boils down to a peculiar difference in flex behavior in Safari vs Chrome/Firefox. I distilled the code down to this snippet:
Test page: https://gitcdn.xyz/cdn/zmwangx/fa93c33e1e8cb9e83cd494bc39e3c9a1/raw/97c1e6d23473514811a3703e034b24a13d81f19e/flex.html
In Chrome/Firefox, the inner wrapper shrinkwraps its contents and is vertically centered; in Safari, the inner wrapper fills the outer wrapper, but since it's
display: block, content starts at the beginning, hence not centered. I'm not a CSS expert so can't explain why there's this difference and who's behavior is correct (or if the spec is simply ambiguous here). However, setting vertical margins of the inner wrapper toautoinstead of 0 does fix the problem.