Skip to content

Instantly share code, notes, and snippets.

@damenleeturks
Last active August 19, 2019 15:41
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 damenleeturks/16f41a393fe2cf3df18e4f24b6c998fa to your computer and use it in GitHub Desktop.
Save damenleeturks/16f41a393fe2cf3df18e4f24b6c998fa to your computer and use it in GitHub Desktop.
**Adding Quotation Marks to Quotes:** Because the quotation marks around a quote are a stylistic addition to set it off from the unquoted text, and thus not semantic content themselves, they can be added to your page via CSS (instead of including them in the content of your document).
/*
Because the quotation marks around a quote are a stylistic addition to set it off from the unquoted text, and thus not semantic content themselves, they can be added to your page via CSS (instead of including them in the content of your document).
Note, though, that this means you must use <q> and <blockquote> tags.
*/
/* Quotation marks on both sides of nested quotes (e.g., <blockquote><q></q></blockquote>) */
q,
blockquote {
quotes: "\201C""\201D""\2018""\2019";
/*
First open quote: LEFT DOUBLE QUOTATION MARK (&ldquo;)
First close quote: RIGHT DOUBLE QUOTATION MARK (&rdquo;)
Second open quote: LEFT SINGLE QUOTATION MARK (&lsquo;)
Second close quote: RIGHT SINGLE QUOTATION MARK (&rsquo;)
*/
}
/* Quotation marks on both sides of a blockquote */
blockquote {
quotes: '“''”';
}
/* Quotation marks at the beginning of each paragraph inside a blockquote */
blockquote p:before {
content: '“';
content: open-quote;
}
/* No quotation marks at the end of each paragraph inside a blockquote */
blockquote p:after {
content: '';
content: no-close-quote;
}
/* Quotation marks at the end of the last paragraph inside a blockquote */
blockquote p:last-child:after {
content: '”';
content: close-quote;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment