[Minor Bug] Corp descriptions with huge font

Please report bugs here, please be very detailed in your bug reports. If you've come up with some code to fix the bug, please post it here.
Post Reply
Eek
Someday Author
Posts: 73
Joined: Fri Dec 17, 2010 00:20

[Minor Bug] Corp descriptions with huge font

Post by Eek »

As you can see on the following page:

http://www.demonic-retribution.com/?a=c ... l&crp_id=1

The box with the corp description text contains a huge font. Earlier this was also the case for the "traits" of ship descriptions, but this was fixed a while ago.

I checked other KB's and they all seem to have the same problem.

- Eek
User avatar
prometh
Advanced
Posts: 170
Joined: Thu Aug 09, 2012 19:25
Contact:

Re: [Minor Bug] Corp descriptions with huge font

Post by prometh »

Hi, there is a problem with the CSS style which causes the text to come out huge. Just edit the stylesheet (style.css) for your theme, find the description font part and change it to something like

Code: Select all

.description font {
font-size: 10pt;
}
Then it should look like this:

http://brgf.de/kb/index.php/corp_detail/1/

Cheers,
prometh
Eek
Someday Author
Posts: 73
Joined: Fri Dec 17, 2010 00:20

Re: [Minor Bug] Corp descriptions with huge font

Post by Eek »

Hmm, assuming you mean <stylename>.css i went into my custom style CSS and could not find any line that included "description". However, in de default.css there were a couple lines:

Code: Select all

.alliance-detail td,
.corp-detail td,
.pilot-detail td
{
	font-weight: bold;
	text-align: left;
}

.alliance-detail td:last-child,
.corp-detail td:last-child
{
	font-weight: normal;
}

.corp-detail .description
{
	height: 100px;
	overflow: auto;
	width: 100%;
}
I'll see if editing these lines changes anything.
your favourite canadian
Noob
Posts: 7
Joined: Wed Jun 04, 2014 22:33

Re: [Minor Bug] Corp descriptions with huge font

Post by your favourite canadian »

Any chance we could get this fixed in the next release?
User avatar
Salvoxia
Developer
Posts: 1598
Joined: Wed Feb 22, 2012 12:11

Re: [Minor Bug] Corp descriptions with huge font

Post by Salvoxia »

Hi,

I implemented a fix which will ship with the next release.

Regards,
Salvoxia
MiloC
Noob
Posts: 8
Joined: Mon Dec 01, 2014 13:21

Re: [Minor Bug] Corp descriptions with huge font

Post by MiloC »

This seems to have cropped up again in a different format.

The default text color for corporate descriptions is know a sort of pale cyan color. This seems to be the case across a couple of killboards I've checked.

Example can be found here. Not been able to find anything in style.css that lists said cyan color?
User avatar
Salvoxia
Developer
Posts: 1598
Joined: Wed Feb 22, 2012 12:11

Re: [Minor Bug] Corp descriptions with huge font

Post by Salvoxia »

The API itself outputs this color tag.
CCP uses some kind of pseudo HTML for formatting ingame texts, and as soon as any form of formatting options are used ingame, this color tag is wrapped around all of it by the API.
Knowing this, we could strip the text of from this tag, but there's no way knowing whether such a tag was intended by the creator or not.
MiloC
Noob
Posts: 8
Joined: Mon Dec 01, 2014 13:21

Re: [Minor Bug] Corp descriptions with huge font

Post by MiloC »

For folks looking to fix this, I did a bit of tweaking:

In common/corp_detail.php, navigate to line 248, and under

Code: Select all

// replace non-html size
$description = preg_replace('/<font size=\"[1-9]+\"/', '<font', $description);
add

Code: Select all

//strip out broken cyan color tag
$description = preg_replace('/color=\"#bfffffff\"/', '', $description);
This will cause the corp description text to default to whatever your main board is using, and will allow you to define a specific color for it under .corp-detail .description in style.css

Working example here.
Post Reply