Live data from Hacker News

Writ – Opinionated, classless styles for semantic HTML

cmcenroe.me

41–50 of 65 posts

Re: Writ – Opinionated, classless styles for semantic HTML

#41
post #20

Do people realize here that classes in HTML were actually invented to hook styling info through CSS and that it's actually the approved and promoted use case by the standards body?

Yes, but clearly in this case classes were not needed to make clean, responsive, and readable design.

Re: Writ – Opinionated, classless styles for semantic HTML

#42
post #31

Earlier quoted context omitted.

Font sizes are even better if defined in PT instead of PX!

Eh, 16px = 12pt, simple 4:3 ratio, why bother with the pt unit at all?

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

#45

ul li { list-style-type: disc; } ul li li { list-style-type: circle; } ul li li li { list-style-type: square; } ol li { list-style-type: decimal; } ol li li { list-style-type: lower-roman; } ol li li li { list-style-type: lower-alpha; } These are bad. Very bad. Example: uses unordered styling on the ordered inner list. A little better: ul > li { list-style-type: disc; } ul ul > li { list-style-type: circle; } ul ul u…

Oops, I didn't notice this, thanks!

Edit: https://github.com/programble/writ/issues/4

Re: Writ – Opinionated, classless styles for semantic HTML

#46
post #31

Earlier quoted context omitted.

Font sizes are even better if defined in PT instead of PX!

Eh, 16px = 12pt, simple 4:3 ratio, why bother with the pt unit at all?

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

#47

On the reference page https://cmcenroe.me/writ/reference.html the aside note causes a horizontal scrollbar for me. Chromium 43.0.2357.81 (64-bit) on linux.

The styling was an experiment, since I'm really not sure how to style those nicely. On a large enough screen, the aside sites off beside the body text, and on a mobile browser, the grey line is visible on the right and you can scroll over to see the aside. Unfortunately this doesn't work well at all on screen sizes small enough that the aside half fits.

Edit: https://github.com/programble/writ/issues/6

Re: Writ – Opinionated, classless styles for semantic HTML

#48
post #9

Feels like a response to: http://motherfuckingwebsite.com and http://bettermotherfuckingwebsite.com But it breaks the font sizing. Also it would be cool if H1 would be smaller inside an ARTICLE than H1 outside of an article like the default setting in Safari etc. Would be good if useful defaults wouldn't be destroyed by too general css.

https://github.com/programble/writ/issues/5
Post reply on HN