Remove max-height from ".codebox code" in content.css?

Found an issue with the phpBB system here at NESdev? Use this forum to report problems.

Moderator: Moderators

Post Reply
User avatar
Dwedit
Posts: 5087
Joined: Fri Nov 19, 2004 7:35 pm
Contact:

Remove max-height from ".codebox code" in content.css?

Post by Dwedit »

This is a coding forum, it really makes no sense to have a maximum height for "code" boxes.

From "content.css": (max-height property)

Code: Select all

.codebox code {
	overflow: auto;
	display: block;
	height: auto;
	max-height: 200px;
	padding: 10px 8px;
	font: 0.9em Monaco, "Andale Mono","Courier New", Courier, monospace;
	line-height: 1.3em;
}
----
edit: Looks like there might be multiple possible CSS files on the server side. I see the file in question at https://forums.nesdev.org/styles/prosilver_dark/theme/content.css
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!
brizzo
Site Admin
Posts: 37
Joined: Mon Feb 03, 2014 1:08 am

Re: Remove max-height from ".codebox code" in content.css?

Post by brizzo »

I appreciate when useful requests comes with the solution!

The max-height property has been removed, will require a ctrl+f5 refresh on your end.

:beer:
creaothceann
Posts: 746
Joined: Mon Jan 23, 2006 7:47 am
Location: Germany
Contact:

Re: Remove max-height from ".codebox code" in content.css?

Post by creaothceann »

On Windows systems, Monaco isn't installed by default and Courier New is quite hard to read imo, especially with the dark theme. Could we have a more modern font for code boxes, like Consolas?

It also seems like Firefox for some reason automatically restricts the vertical size of code boxes, unlike Chrome or Edge. Would it be possible to enable the resize grabbers for code boxes that are already present on reply boxes?
My current setup:
Super Famicom ("2/1/3" SNS-CPU-GPM-02) → SCART → OSSC → StarTech USB3HDCAP → AmaRecTV 3.10
Drag
Posts: 1645
Joined: Mon Sep 27, 2004 2:57 pm
Contact:

Re: Remove max-height from ".codebox code" in content.css?

Post by Drag »

I'm on Firefox and the code boxes are no longer height-limited (THANK YOU), maybe try shift-clicking the refresh button?

About the font, if you really want to cover all bases, just change the font to "monospace", and let the user configure their browser with whatever font they want to appear for "monospace" (in Firefox, it's Settings, Font, Advanced, Monospace).
Fiskbit
Site Admin
Posts: 1103
Joined: Sat Nov 18, 2017 9:15 pm

Re: Remove max-height from ".codebox code" in content.css?

Post by Fiskbit »

Resize grabbers was something I suggested for this a few years back, but it's apparently not something we can easily add to phpBB because it's not using <textarea>. Perhaps with a move to xenforo, which we'd still like to do sometime. Removing the size limit altogether is a good and simple solution for now.

The new box sizing seem to be working fine for me in Firefox after a hard refresh. I don't have a strong opinion on the font (the Firefox monospace default seems to be Consolas), but if people are indeed interested in this, I'll poke brizzo. Changing it to "monospace" sounds pretty reasonable.
brizzo
Site Admin
Posts: 37
Joined: Mon Feb 03, 2014 1:08 am

Re: Remove max-height from ".codebox code" in content.css?

Post by brizzo »

I have changed the font property to have `monospace` as the default and fallback to the other variants if needed.
creaothceann
Posts: 746
Joined: Mon Jan 23, 2006 7:47 am
Location: Germany
Contact:

Re: Remove max-height from ".codebox code" in content.css?

Post by creaothceann »

Thanks!
My current setup:
Super Famicom ("2/1/3" SNS-CPU-GPM-02) → SCART → OSSC → StarTech USB3HDCAP → AmaRecTV 3.10
Pokun
Posts: 3047
Joined: Tue May 28, 2013 5:49 am
Location: Hokkaido, Japan

Re: Remove max-height from ".codebox code" in content.css?

Post by Pokun »

It didn't seem to work at first but now it works.
Thanks this is great!
Post Reply