biow0lf / evedev-kb

Automatically exported from code.google.com/p/evedev-kb
1 stars 0 forks source link

CSS issues regarding faction items on item lists when the "highlight faction" option is selected #189

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. On 4.0.0 or 4.0.1 boards, select the admin options for ammo/item highlight 
styles.
2. View a kill/loss with faction items.
3. View a pilot_detail.php/ships&weapons for a pilot who has faction items in 
their "most used weapons" slot.

What is the expected output? What do you see instead?

Glowing backgrounds on items, centered in their cell is expected.  Instead, the 
icons bleed over to nearby cells.

What version of the board are you using? 4.0.1

Please provide any additional information below.

The glowing backgrounds are handled by using a span with absolute positioning, 
through the icon*.tlp files.  You can fix this a number of ways, but I 
generally recommend the following:

1. Make sure that the icon*.tpl files don't use classes... the item-icon class 
should be for td/th/div, etc.  The CSS for that class should have 
vertical-align: top.

2. There is a bug in kill_detail_items_lost.tpl where one of the <td>'s are not 
given the "item-icon" class (they are just <td>), these need to have that 
class.  if you grep for {$i.Icon} you can quickly identify which ones have 
classes set and which ones don't.

3. the IGB version of this template probably needs to be fixed too, but I've 
been doign all my debugging outside of IGB.

4. SOME places like player_detail/ships&weapons use a different class 
(kb-table-imgcell).  They should probably use item-icon as well.  Failing that, 
we need to modify default.css to use vertical-align: top there instead of 
middle.

Original issue reported on code.google.com by jjl...@gmail.com on 14 Dec 2011 at 4:07

GoogleCodeExporter commented 9 years ago
The current status looks well confused.

kb-table-imgcell should be used inside a kb-table for 32x32 images. Most 
importantly to remove padding, but setting size as well. This is aimed at 
killlist tables, but kill_related and toplists have similar needs (but quite 
possibly still deserve their own class).

item-icon is used too variably. The point of it originally was to help the 
various highlighting methods - icon*tpl but the move to bare img where 
possible, and the use in fitting, item list, and invtype has confused that. 
(And incidentally, that code seems to be complex enough and old enough that 
some of it is just completely wrong now, but not actually used!) I think 
item-icon should only be used for item icons that we may set the highlighting 
for. (Considering removing highlighting completely as well now that every icon 
has t2/faction marked on it.) It controls behaviour of the highlighting 
wrapper, and whatever the parent may need to do to contain it.

I think the icon*tpl should be divs, not spans, since we're using them as 
blocks. Removing all their styling other than dimensions, and the absolute 
positioning from that div in the css, fixes the positioning.

e.g. now we have
<span class="item-icon" style="position:absolute; border: none; height:32px; 
width:32px; text-align:left;">

<div class="item-icon">

As for removing the class and only having it in the parent, I don't really like 
that as it forces you to always add icon styling to the parent to control the 
child if you want to adjust icon styling. The result is identical, of course, 
but it seems to be less flexible if we change anything in the future.

2. is fixed in Revision 3a2cc2a655ae.
3. Some other issues there I'm just checking before pushing.

Hey, want to take over theming EDK? ^^

Original comment by kovellia on 15 Dec 2011 at 10:29

GoogleCodeExporter commented 9 years ago
Revision 7b53a33a05ee and Revision d4d1b6cf5f5c should fix your other issues.

If you don't see any problem with the changes then I'll close this issue.

Original comment by kovellia on 15 Dec 2011 at 11:09

GoogleCodeExporter commented 9 years ago
I'm sure they are fine.  I assure you that I'm the least suited person for 
helping with architectural CSS decisions.  I'm barely wearing any pants with 
php, let alone CSS/HTML.

Professionally, I work in other languages.

Original comment by jjl...@gmail.com on 15 Dec 2011 at 8:59

GoogleCodeExporter commented 9 years ago
So you do wear pants in the other languages then?

Original comment by kovellia on 15 Dec 2011 at 11:32