Skip to content

Instantly share code, notes, and snippets.

@djuxed
Last active October 13, 2015 21:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save djuxed/4259229 to your computer and use it in GitHub Desktop.
Save djuxed/4259229 to your computer and use it in GitHub Desktop.
Better Ampersand in CSS3. Unicode range allows you to target specific characters that are not likely to be used within the content, for example changing the font only for the 'Ampersand' or special characters.
@font-face {
font-family: 'Ampersand';
src: local('Baskerville'), local('Palatino'), local('Book Antiqua');
unicode-range: U+26;
}
@font-face {
/* Ampersand fallback font, otherwise the Ampersand font family will be applied to all characters for unsupported browsers. */
font-family: 'Ampersand';
src: local('Arial');
unicode-range: U+270C;
}
h1 {
font-family: Ampersand, Arial, sans-serif;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment