add globals controls to the fax menu item on the tab layout
[openemr.git] / phpmyadmin / themes / sprites.css.php
blobf458077eeac10f1442d386f91d47d8863b7e6572
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
4 * This file generates the CSS code for the sprites of a theme
6 * @package PhpMyAdmin-theme
7 */
9 // unplanned execution path
10 if (! defined('PMA_MINIMUM_COMMON')) {
11 exit();
14 $bg = $_SESSION['PMA_Theme']->getImgPath() . 'sprites.png?v=' . urlencode(PMA_VERSION);
15 /* Check if there is a valid data file for sprites */
16 if (is_readable($_SESSION['PMA_Theme']->getPath() . '/sprites.lib.php')) {
19 /* Icon sprites */
20 .icon {
21 margin: 0;
22 margin-<?php echo $left; ?>: .3em;
23 padding: 0 !important;
24 width: 16px;
25 height: 16px;
26 background-image: url('<?php echo $bg; ?>') !important;
27 background-repeat: no-repeat !important;
28 background-position: top left !important;
30 <?php
32 include_once $_SESSION['PMA_Theme']->getPath() . '/sprites.lib.php';
33 $sprites = array();
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
40 $width = '';
41 $height = '';
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;";
51 printf(
52 $template,
53 $name,
54 ($data['position'] * 16),
55 $width,
56 $height