Skip to content

Instantly share code, notes, and snippets.

@yyfrankyy
Created June 15, 2010 04:58
Show Gist options
  • Save yyfrankyy/438714 to your computer and use it in GitHub Desktop.
Save yyfrankyy/438714 to your computer and use it in GitHub Desktop.
/* @see http://www.w3.org/TR/CSS2/generate.html#quotes */
/* chrome(safari maybe?) does not support quote, it use ::before and :after pseudo-elements to decorate q tag */
q::after,
q::before {
content: '"'
}
/* Firefox full support quotes */
/* e.g. <span rel="book" lang="zh">I have a Dream</span> */
span[rel=book] {
border-bottom: 2px solid #444;
font-weight: bold;
}
span[rel=book] {
font-style: italic;
}
span[rel=book]:lang(zh) {
quotes: '《' '》';
font-style: normal;
}
span[rel=book]:before {
content: open-quote;
}
span[rel=book]:after {
content: close-quote;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment