2 /* vim: set expandtab sw=4 ts=4 sts=4: */
4 * This file generates the CSS code for the sprites of a theme
6 * @package PhpMyAdmin-theme
9 // unplanned execution path
10 if (! defined('PMA_MINIMUM_COMMON')) {
14 $bg = $_SESSION['PMA_Theme']->getImgPath() . 'sprites.png';
15 /* Check if there is a valid data file for sprites */
16 if (is_readable($_SESSION['PMA_Theme']->getPath() . '/sprites.lib.php')) {
22 margin
-<?php
echo $left; ?
>: .3em
;
23 padding
: 0 !important
;
26 background
-image
: url('<?php echo $bg; ?>') !important
;
27 background
-repeat
: no
-repeat
!important
;
28 background
-position
: top left
!important
;
32 include_once $_SESSION['PMA_Theme']->getPath() . '/sprites.lib.php';
34 if (function_exists('PMA_sprites')) {
35 $sprites = PMA_sprites();
37 $template = ".ic_%s { background-position: 0 -%upx !important;%s%s }\n";
38 foreach ($sprites as $name => $data) {
39 // generate the CSS code for each icon
42 // if either the height or width of an icon is 16px,
43 // then it's pointless to set this as a parameter,
44 //since it will be inherited from the "icon" class
45 if ($data['width'] != 16) {
46 $width = " width: " . $data['width'] . "px;";
48 if ($data['height'] != 16) {
49 $height = " height: " . $data['height'] . "px;";
54 ($data['position'] * 16),