4 ms·
There's another way to make fractions in Unicode, using the fraction slash (U+2044) and/or superscript and subscript numerals. That way you can get arbitrary fr
by ramshorns 10y ago
There's another way to make fractions in Unicode, using the fraction slash (U+2044) and/or superscript and subscript numerals. That way you can get arbitrary fractions that don't have their own vulgar fraction character.
- extra88 10y agoNice! FYI, that's the hex value so in HTML write it like so: Fraction four sevenths: <sup>4</sup>⁄<sub>7</sub>
- deleted 10y ago[deleted]
- bmh_ca 10y agoI wonder if a single fraction would have better kerning than could be achieved with the slash and super/subscripts.
- extra88 10y agoI'm not a typography nerd and I'm sure the Unicode fractions are typically tighter but it looks okay to me. http://output.jsbin.com/veqakaj http://output.jsbin.com/veqakaj
- ramshorns 10y agoThere are a few ways to do it, including Unicode superscript and subscript characters rather than formatting. These ones all look a bit different in my browser: https://en.wikipedia.org/wiki/Unicode_subscripts_and_superscripts#Uses https://en.wikipedia.org/wiki/Unicode_subscripts_and_supersc...
- extra88 10y agoThey sure do, I added the Unicode superscript and subscript variant to that bin page, it's much more compact than the HTML element super and subscripts. I wonder what screenreader support is like for the Unicode vulgar fractions, the HTML, and the all-Unicode variants. Apple's VoiceOver correctly reads the Unicode 'fraction slash' and superscript and subscript numbers. Now that I'm thinking about it, using superscript and subscript with fraction slash visually displays a fraction as we expect but is not semantically correct; unmodified ASCII numbers separated by 'fraction slash' would more accurately represent the numerators and denominators.
- 1wd 10y agoHm, works quite well. ⁹⁄₇
- jamesrom 10y agoYep a solid ⁵⁄₇.
- jmduke 10y agoAh, thanks for this! I'm going to add it to the site.