News for hackers. Stuff that matters.
Re:Writ – Opinionated, classless styles for semantic HTML by andybak on Tuesday August 25, 2015 @04:10AM (#10115107)
The body font size seems tiny to me.
Re:Writ – Opinionated, classless styles for semantic HTML by chrismorgan on Tuesday August 25, 2015 @04:13AM (#10115122)
Yeah, font-size: 14px is a bad idea. It should really, really be put back to 16px (just leave the definition out!).
Re:Writ – Opinionated, classless styles for semantic HTML by err4nt on Tuesday August 25, 2015 @08:12AM (#10115857)
Font sizes are even better if defined in PT instead of PX!
Re:Writ – Opinionated, classless styles for semantic HTML by chrismorgan on Tuesday August 25, 2015 @08:30AM (#10115948)
Eh, 16px = 12pt, simple 4:3 ratio, why bother with the pt unit at all?
Re:Writ – Opinionated, classless styles for semantic HTML by err4nt on Tuesday August 25, 2015 @09:52AM (#10116437)
I come from a graphic design background with training in typography. While you _can_ specify font-size in any units CSS understands, typography as a field has traditionally used PT and EM units for sizing and spacing.

- for container size I use % or PX

- for margins, spacing, and padding I use EM or PX

- for text sizes I use PT or %

Here's a short, good primer for typography on the web: http://www.markboulton.co.uk/journal/five-simple-steps-to-be...

Re:Writ – Opinionated, classless styles for semantic HTML by leni536 on Tuesday August 25, 2015 @11:05AM (#10116995)
Yeah, on 96 DPI. Anywhere else you rely on browser scaling if you don't use pt.

Edit: Ok, so I'm not a web developer, so I read after it: http://www.w3.org/Style/Examples/007/units.en.html

Turns out I'm wrong about that 1px is required to be 1 device pixel. But the 3/4 rule is not universal and only applies to print. I don't know how different implementations handle this.

Re:Writ – Opinionated, classless styles for semantic HTML by err4nt on Friday August 28, 2015 @12:46AM (#10133772)
CSS 'pixels' are a dark, dark magic, come back to the light!

CSS pixels are a measure of your viewing angle, the physical measurement of the device, and your screen's pixel density. Basically 15px should look like 15px should look like 15px, no matter what you're looking at, but because the actual pixel densities of screens differ it can be really weird to think about.

You may need a 30px icon to display 15px wide on a retina screen, even though it sounds like a 15px image should be 100% large (and therefore crisp) at 15px in CSS.

Re:Writ – Opinionated, classless styles for semantic HTML by theandrewbailey on Tuesday August 25, 2015 @09:06AM (#10116132)
16px will always be 16px, unless you redefine CSS pixel size. pt is more scalable.
Re:Writ – Opinionated, classless styles for semantic HTML by err4nt on Friday August 28, 2015 @12:49AM (#10133781)
CSS 'px' units don't map directly 1:1 with pixels in your screen, it's weird. :/

In general, CSS 'PX' is great for spacing inside and outside containers. I often use 5px or 15px padding in places that don't directly touch or contain text. Where text is involved I like to define my spacing in 'em' units because those are relative to the 'font-size', so if I change the font size the spacing will still look great!

Re:Writ – Opinionated, classless styles for semantic HTML by programble on Tuesday August 25, 2015 @11:14AM (#10117052)