Skip to content

Instantly share code, notes, and snippets.

@mrtony
Created October 10, 2018 04:14
Show Gist options
  • Save mrtony/980700cbe8f701cb490e015fe24194bf to your computer and use it in GitHub Desktop.
Save mrtony/980700cbe8f701cb490e015fe24194bf to your computer and use it in GitHub Desktop.
Sass - Variable Scoping

限制變數在特定範圍中, 避免污染全域

.container {
  $rhythm: 1em;
  margin: 0 auto;
  max-width: 42em;
  padding: 0 $rhythm;
  p {
  text-indent: $rhythm;
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment