News for hackers. Stuff that matters.
Re:Primer – CSS toolkit and guidelines that power GitHub by andreash on Tuesday March 24, 2015 @05:28AM (#9255565)
I think the "Pixels vs ems" was a bit short. Anyone?http://primercss.io/guidelines/
Re:Primer – CSS toolkit and guidelines that power GitHub by speg on Tuesday March 24, 2015 @07:09AM (#9255848)
Yeah, I thought rems were the new thing?
Re:Primer – CSS toolkit and guidelines that power GitHub by mdo on Tuesday March 24, 2015 @01:34PM (#9258074)
All of GitHub is basically in pixels, save for our Markdown styles—for easy modification across devices, we use `em`s. It'd be a huge project to update that to `rem`s anytime soon.
Re:Primer – CSS toolkit and guidelines that power GitHub by andreash on Tuesday March 24, 2015 @02:52PM (#9258602)
If you'd make it from scratch today, what technique would you use? html {font-size:62.5% } with REM?
Re:Primer – CSS toolkit and guidelines that power GitHub by mdo on Tuesday March 24, 2015 @06:38PM (#9260021)
Set an HTML font-size—likely 16px—and use body { font-size: 1rem; }. Allows for easy media query scaling of type.