Skip to content

Instantly share code, notes, and snippets.

@stikoo
Forked from apisandipas/_html_entities.scss
Created December 20, 2017 15:56
Show Gist options
  • Save stikoo/d275bc0f2928d88738f804b9c571b0e7 to your computer and use it in GitHub Desktop.
Save stikoo/d275bc0f2928d88738f804b9c571b0e7 to your computer and use it in GitHub Desktop.
HTML Entities map - The pseudo-element 'content' property doesnt accept normal (») style HTML entities. These variables below easy the pain of looking up the HEX codes...
/**
* The pseudo-element 'content' property doesnt accept normal (») style
* HTML entities. These variables below easy the pain of looking up the HEX codes...
*
* Referenced from http://www.danshort.com/HTMLentities/
*
* TODO: Add all the other entities? Worth it? Some day? Maybe?
*/
// Punctuation
$quot: "\22"; // Quotation mark "
$amp: "\26"; // Ampersand &
$lt: "\3C"; // Less-than sign <
$lsquo: "\2018"; // Open single quote ‘
$rsquo: "\2019"; // Close single quote ’
$ldquo: "\201C"; // Open double quotes “
$rdquo: "\201D"; // Close double quotes ”
$sbquo: "\201A"; // Single low-9 quote ‚
$dquo: "\201E"; // Double low-9 quote „
$prime: "\2032"; // Prime/mins/ft ′
$dblprime: "\2033"; // DblPrime/secs/in ″
$nbsp: "\A0"; // Non-breaking space
$hyphen: "\2010"; // Hyphen ‐
$ndash: "\2013"; // En dash –
$mdash: "\2014"; // Em dash —
$nspace: "\2002"; // En space  
$mspace: "\2003"; // Em space  
$thinsp: "\2009"; // Thin space
$brvbar: "\A6"; // Broken vert bar ¦
$bull: "\2022"; // Bullet •
$tri: "\2023"; // Triangular bullet ‣
$hellip: "\2026"; // Horizontal ellipsis …
$circ: "\2C6"; // Circumflex ˆ
$uml: "\A8"; // Umlaut or dieresis ¨
$tilde: "\2DC"; // Small tilde ˜
$lsaquo: "\2039"; // Single left angle ‹
$rsaquo: "\203A"; // Single right angle ›
$laquo: "\AB"; // Guillemot left «
$raquo: "\BB"; // Guillemot right »
$oline: "\203E"; // Overline ‾
$iquest: "\BF"; // Inverted q-mark ¿
$iexcl: "\A1"; // Inverted exclamation ¡
$intbang: "\203D"; // Interrobang ‽
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment