Code boxes could do with a little bit of love

User avatar
spacemonaut
Bauble reclaimer
Posts: 1387
Joined: 4 years ago
Answers: 10
Pronoun: she / her
Location: Scotland

Post by spacemonaut » 2 years ago

Quotes look really nice:
spacemonaut if she were a robot wrote:Beep boop
But code boxes are just a little bit left out in the cold by comparison in terms of presentation:

Code: Select all

#postform #postingbox #subject {
  width: 300px !important;
  padding: 5px;
  border-radius: 6px;
}
.inputbox:hover {
  border-color: #6bc;
}
Things I'd really like to see:
  • the header bar be given better alignment & treatment
  • the spacing inside the text box being given a little bit of care: there's a massive one line gap above and below the code, but the text is flush against the side. Instead it'd be good to see some even spacing all around, like 8px top and side.
  • a better monospace font for Windows. This currently uses Courier New, but that particular font is kind of awful and is falling out of favour compared to newer fonts like Consolas.
Here's a before/after with just these minimal changes:

Before
2022-04-03_20-58-09_firefox.png
After
2022-04-03_20-57-57_firefox.png

User avatar
spacemonaut
Bauble reclaimer
Posts: 1387
Joined: 4 years ago
Answers: 10
Pronoun: she / her
Location: Scotland

Post by spacemonaut » 2 years ago

also sidenote the CSS applied to the DL/DT structure in these attachment images gives them a REALLY weird spacing that's kinda opposite to the text i put in: i put a blank line ABOVE the "after", but instead i get a blank BELOW the "after" and no blank line above.

User avatar
Feyd_Ruin
Elder Vampire
Posts: 5478
Joined: 5 years ago
Answers: 3
Pronoun: he / him
Contact:

Post by Feyd_Ruin » 2 years ago

How's it look now?

Code: Select all

#postform #postingbox #subject {
  width: 300px !important;
  padding: 5px;
  border-radius: 6px;
}
.inputbox:hover {
  border-color: #6bc;
}
And yeah, line breaks with certain block elements are really weird with phpbb.
Your above only has one line break, but the file attachment has a hefty margin-top.

You've got a good eye, so feel free to offer any other suggestions you think would improve the visuals/ux
To the beaten, the broken, or the damned; the lost, and the wayward: wherever I may be, you will have a home.

User avatar
spacemonaut
Bauble reclaimer
Posts: 1387
Joined: 4 years ago
Answers: 10
Pronoun: she / her
Location: Scotland

Post by spacemonaut » 2 years ago

Cousine's not a bad choice! Thanks, this is looking a lot better.

I'd consider bumping the line height for .codebox code up to about 20px or 1.33em. The code looks a bit vertically cramped with a line height of only around 17px/1.1em.

Our regular posts just so happen to already be using 1.4em line height! You could use that too, it'd equal just 21px for the code box, so no big difference.

Line heights around 1.33em/1.4em tend to be really nice for legibility.

User avatar
Feyd_Ruin
Elder Vampire
Posts: 5478
Joined: 5 years ago
Answers: 3
Pronoun: he / him
Contact:

Post by Feyd_Ruin » 2 years ago

Went with 20 as a nice middle ground.
(Any bigger is bothersome to me [and maybe others] heh)
To the beaten, the broken, or the damned; the lost, and the wayward: wherever I may be, you will have a home.

Post Reply Previous topicNext topic

Return to “Community Software Feedback and Bug Reports”