Last active
August 29, 2015 14:22
-
-
Save techgraphics/55c3634f8d6dc46a1cf6 to your computer and use it in GitHub Desktop.
Points defined as “CSS pixels”
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*! MIT license */ | |
/** | |
* Points (defined as CSS pixels) | |
* | |
* Reference: http://www.thomasphinney.com/2011/03/point-size/ | |
* | |
* The web can use points, but just defines them in terms of pixels. | |
* It has inherited the Windows definition of that ratio, so on the web by default 1 pt = 4/3 pixels, so 12 pt is equal to 16 pixels. | |
* | |
* But the relationship between pixels and points is broken in some browsers on Windows (such as Internet Explorer 7 and earlier) when the user has a non-standard resolution set. | |
* | |
* | |
* 0.125pt= 0.166..px | |
* 0.25pt = 0.33..px | |
* 0.5pt = 0.66..px | |
* 0.75pt = 1px | |
* | |
* 1pt = 1.33..px | |
* 1.25pt = 1.66..px | |
* 1.5pt = 2px | |
* 1.75pt = 2.33..px | |
* | |
* 2pt = 2.66..px | |
* 2.25pt = 3px | |
* 2.5pt = 3.33..px | |
* 2.75pt = 3.66..px | |
* | |
* 3pt = 4px | |
* 3.5pt = 4.66..px | |
* 4pt = 5.33..px | |
* 4.5pt = 6px | |
* 5pt = 6.66..px | |
* 5.5pt = 7.33..px | |
* 6pt = 8px | |
* 6.5pt = 8.33..px | |
* 7pt = 9.33..px | |
* 7.5pt = 10px | |
* 8pt = 10.66..px | |
* 8.5pt = 11.33..px | |
* 9pt = 12px | |
* 9.5pt = 12.33..px | |
* | |
* 10pt = 13.33..px | |
* 10.5pt = 14px | |
* 11pt = 14.66..px | |
* 11.5pt = 15.33..px | |
* 12pt = 16px | |
* 12.5pt = 16.66..px | |
* 13pt = 17.33..px | |
* 13.5pt = 18px | |
* 14pt = 18.66..px | |
* 14.5pt = 19.33..px | |
* 15pt = 20px | |
* 15.5pt = 20.66..px | |
* | |
* 16pt = 21.33..px | |
* 17pt = 22.66..px | |
* 18pt = 24px | |
* 19pt = 25.33..px | |
* | |
* 20pt = 26.66..px | |
* 22pt = 29.33..px | |
* 24pt = 32px | |
* 26pt = 34.33..px | |
* 28pt = 37.33..px | |
* | |
* 30pt = 40px | |
* 32pt = 42.66..px | |
* 34pt = 45.33..px | |
* 36pt = 48px | |
* 38pt = 50.66..px | |
* | |
* 40pt = 53.33..px | |
* 42pt = 56px | |
* 44pt = 58.66..px | |
* 46pt = 61.33.. | |
* 48pt = 64px | |
* | |
* 50pt = 66.66..px | |
* 52pt = 69.33..px | |
* 54pt = 72px | |
* 56pt = 74.66..px | |
* 58pt = 77.33..px | |
* | |
* 60pt = 80px | |
* 66pt = 88px | |
* | |
* 72pt = 96px | |
* 84pt = 112px | |
* 96pt = 128px | |
* 108pt = 144px | |
* 120pt = 160px | |
* 132pt = 176px | |
* 144pt = 192px | |
* | |
* 168pt = 224px | |
* 192pt = 256px | |
* 216pt = 288px | |
* 240pt = 320px | |
* 264pt = 352px | |
* 288pt = 384px | |
* | |
*/ | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment