Instantly share code, notes, and snippets.

@djuxed /gist:4259229
Last active Oct 13, 2015

Embed
What would you like to do?
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