Comment by [deleted] on 06/02/2020 at 03:50 UTC*

2 upvotes, 1 direct replies (showing 1)

View submission: How to add rules

I'm sure there are infinite variations on this, including the r/canada example linked above. I took this code from a different sub, their version was shorter than r/canada's, and I further stripped out some lines that didn't seem to contribute very much.

Put this in your old-Reddit CSS stylesheet:

.side .md h5 {
background: #EEE;
}
.side .md blockquote {
margin-left: 0;
border: 0;
}
.side .md h5:not(:hover) + blockquote:not(:hover) * {
font-size:0;
}

and then put this in your old-Reddit sidebar:

######1. Rule title

> Rule text

######2. Rule title

> Rule text

######3. Rule title

> Rule text

Etc.

You can change h5 and the number of # if you like, but 5 seems to be a good size. Obviously you can change the color too, #EEE is a pleasant light gray that makes the block stand out but not ridiculously so. The margin-left and border lines aren't absolutely necessary either, but they do kill the blockquote left-hand border that you'd get otherwise.

Also, while the CSS doesn't load for the mobile browser "about" page, the arrangement of the h5 headers and block quoted rules actually displays fairly well there.

Replies

Comment by SolariaHues at 06/02/2020 at 08:43 UTC

1 upvotes, 0 direct replies

Thank you!