Skip to content

Instantly share code, notes, and snippets.

@MThakkar121
Created July 31, 2019 13:39
Show Gist options
  • Save MThakkar121/9a407434d549c0a5fe72e7fc9fb4dbd7 to your computer and use it in GitHub Desktop.
Save MThakkar121/9a407434d549c0a5fe72e7fc9fb4dbd7 to your computer and use it in GitHub Desktop.
min() & max()
$padding: 12px
.post
// Since these max() calls don't use any Sass features other than
// interpolation, they're compiled to CSS max() calls.
padding-left: max(#{$padding}, env(safe-area-inset-left))
padding-right: max(#{$padding}, env(safe-area-inset-right))
.sidebar
// Since these refer to a Sass variable without interpolation, they call
// Sass's built-in max() function.
padding-left: max($padding, 20px)
padding-right: max($padding, 20px)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment