gabrielecirulli / hn-special

A modern theme for Hacker News, with some added niceties.
MIT License
333 stars 71 forks source link

Fix first paragraph in a comment always having a different style. #108

Closed nfvs closed 8 years ago

nfvs commented 8 years ago

Really caused by a peculiarity in the HN comments HTML, where the first paragraph has no wrapping element, but the following paragraphs are wrapped by <p></p>.

margin-top: 1em was also split into two: margin-top: 0.5em and margin-bottom: 0.5em. This ensures the same margin exists between the first paragraph and the remaining ones.

Example: image

With the fix: image

nfvs commented 8 years ago

Also fixed first paragraph of a "self" post being "lighter".

Before: image

After: image

nfvs commented 8 years ago

Any chance this can trigger a new release? I know it would get a pretty unspectacular changelog, but the problem is indeed annoying :-)