[Koha-devel] Item Type Images have various sizes

Michael Hafen mdhafen at tech.washk12.org
Wed Feb 11 22:40:35 CET 2009


On Thu, 2009-02-12 at 10:19 +1300, Mason James wrote:
> >
> > I'll admit that it is nice to have the larger icons for the kids ( to
> > this end one of my librarians has asked me to increase the font  
> > size on
> > the opac ).  So, in my opinion, it would be best to have variable
> > padding with the icons.  I just don't look forward to trying to code
> > that.  I think the best way would be to have it statically set.  That
> > way we would save the time it takes to parse the image to find it's
> > width.
> >
> > On Wed, 2009-02-11 at 15:14 -0500, Galen Charlton wrote:
> >> Hi,
> >>
> >> On Wed, Feb 11, 2009 at 3:07 PM, Michael Hafen  
> >> <mdhafen at tech.washk12.org> wrote:
> >>> I think it would be best to standardize on a size for these  
> >>> images, so
> >>> that the css can be set once and look right.
> >>
> >> I would prefer that we accommodate different sizes for the icons
> >> rather than settle for just one "standard" size.  I'm not sure how
> >> many libraries are using the liblime-kids set, but the icons in it  
> >> are
> >> larger than npl or bridge to support a common design pattern for
> >> childrens' OPACs.
> >>
> >> Regards,
> 
> i agree with Galen here.
> 
> 
> Michael, i guess the quick-fix for you, is to change your templates/ 
> css for the bridge-set dimensions
> 
> i wonder if the padding could be changed to a '%' value, rather than  
> a 'px' value...
> could we have some magical auto-boundary handling here?
> 
> 
> <li title="" style="margin: 0.4em 0pt; padding: 3px 0pt 3px 30px;  
> list-style-image: none; list-style-position: outside; list-style- 
> type: none; background-image: url(/opac-tmpl/prog/itemtypeimg/bridge/ 
> book.gif); background-repeat: no-repeat; background-position: 0pt  
> 50%;">  Centerville (1)</li>
> 
> 
> 
> 

Not as far as I know.  CSS tends to assume one knows what they are
working with before hand.  I would move the padding from 30 to 40, which
is the quick fix you suggest.  For those who use the liblime-kids icon
set that would have to be 90.  Then, if they also used the npl set,
there would be an empty space the size of the icon next to any items
that have the npl icon.  A percent doesn't really fix that, it's still a
static size, just a little less so.  What I think would be a good
solution, if it didn't mean so much work, would be to have the item type
information also have the image width, then that value could be dropped
in where the 30 is.  There would be no more guessing that way, just have
to specify the image width when setting up the icon set.
-- 
Michael Hafen
Systems Analyst and Programmer
Washington County School District
Utah, USA

for Koha checkout
http://koha-dev.washk12.org
or
git://koha-dev.washk12.org/koha




More information about the Koha-devel mailing list