Created
May 11, 2018 17:46
-
-
Save Sensiblemnd/b5987670f449c41c4f7a5f50279b128e to your computer and use it in GitHub Desktop.
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
/* ========================================================================== | |
These following classes can be used to add safe-area padding to the either 4 directions | |
========================================================================== */ | |
.iphoneXSafeArea--top{ | |
/* iOS 11.2+ */ | |
padding-top: env(safe-area-inset-top); | |
/* iOS 11 */ | |
padding-top: constant(safe-area-inset-top); | |
} | |
.iphoneXSafeArea--right{ | |
padding-right: env(safe-area-inset-right); | |
padding-right: constant(safe-area-inset-right); | |
} | |
.iphoneXSafeArea--bottom{ | |
padding-bottom: env(safe-area-inset-bottom); | |
padding-bottom: constant(safe-area-inset-bottom); | |
} | |
.iphoneXSafeArea--left{ | |
padding-left: env(safe-area-inset-left); | |
padding-left: constant(safe-area-inset-left); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment