Skip to content

Instantly share code, notes, and snippets.

@Dexdot
Created September 20, 2017 18:34
Show Gist options
  • Select an option

  • Save Dexdot/a6966cff0d3b11c591c71c006051623d to your computer and use it in GitHub Desktop.

Select an option

Save Dexdot/a6966cff0d3b11c591c71c006051623d to your computer and use it in GitHub Desktop.
sass @font-face, @if
@font-face {
font-family: 'Proxima Nova Rg';
src: url('../../prod/fonts/proxima/ProximaNova-Bold.woff2') format('woff2'),
url('../../prod/fonts/proxima/ProximaNova-Bold.woff') format('woff');
font-weight: bold;
font-style: normal;
}
@font-face {
font-family: 'Proxima Nova Rg';
src: url('../../prod/fonts/proxima/ProximaNova-Regular.woff2') format('woff2'),
url('../../prod/fonts/proxima/ProximaNova-Regular.woff') format('woff');
font-weight: normal;
font-style: normal;
}
@mixin prx($style: reg) {
@if $style == reg {
font-family: 'Proxima Nova Rg', sans-serif;
font-weight: normal;
font-style: normal;
}
@if $style == bold {
font-family: 'Proxima Nova Rg', sans-serif;
font-weight: bold;
font-style: normal;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment