mirror of
https://github.com/vrana/adminer.git
synced 2025-08-06 14:46:36 +02:00
Inline GIF to CSS
This commit is contained in:
Binary file not shown.
Before Width: | Height: | Size: 56 B |
Binary file not shown.
Before Width: | Height: | Size: 82 B |
@@ -64,10 +64,6 @@ input.wayoff { left: -1000px; position: absolute; }
|
|||||||
.icon { width: 18px; height: 18px; background-color: navy; border: 0; vertical-align: middle; }
|
.icon { width: 18px; height: 18px; background-color: navy; border: 0; vertical-align: middle; }
|
||||||
.icon span { display: none; }
|
.icon span { display: none; }
|
||||||
.icon:hover { background-color: red; }
|
.icon:hover { background-color: red; }
|
||||||
.icon-up { background-image: url(up.gif); }
|
|
||||||
.icon-down { background-image: url(down.gif); }
|
|
||||||
.icon-plus { background-image: url(plus.gif); }
|
|
||||||
.icon-cross { background-image: url(cross.gif); }
|
|
||||||
.size { width: 7ex; }
|
.size { width: 7ex; }
|
||||||
.help { cursor: help; }
|
.help { cursor: help; }
|
||||||
.footer { position: sticky; bottom: 0; margin-right: -20px; border-top: 20px solid rgba(255, 255, 255, .7); border-image: linear-gradient(rgba(255, 255, 255, .2), #fff) 100% 0; }
|
.footer { position: sticky; bottom: 0; margin-right: -20px; border-top: 20px solid rgba(255, 255, 255, .7); border-image: linear-gradient(rgba(255, 255, 255, .2), #fff) 100% 0; }
|
||||||
@@ -91,9 +87,15 @@ input.wayoff { left: -1000px; position: absolute; }
|
|||||||
#schema { margin-left: 60px; position: relative; user-select: none; -webkit-user-select: none; }
|
#schema { margin-left: 60px; position: relative; user-select: none; -webkit-user-select: none; }
|
||||||
#schema .table { border: 1px solid silver; padding: 0 2px; cursor: move; position: absolute; }
|
#schema .table { border: 1px solid silver; padding: 0 2px; cursor: move; position: absolute; }
|
||||||
#schema .references { position: absolute; }
|
#schema .references { position: absolute; }
|
||||||
#schema .arrow { height: 1.25em; background: url(arrow.gif) no-repeat right center; }
|
|
||||||
#help { position: absolute; border: 1px solid #999; background: #eee; padding: 5px; font-family: monospace; z-index: 1; }
|
#help { position: absolute; border: 1px solid #999; background: #eee; padding: 5px; font-family: monospace; z-index: 1; }
|
||||||
|
|
||||||
|
/* inlined here and not in compile.php because otherwise the development version flickers a little bit when loading the images */
|
||||||
|
.icon-up { background-image: url(data:image/gif;base64,R0lGODlhEgASAIEAMe7u7gAAgJmZmQAAACH5BAEAAAEALAAAAAASABIAAQIghI+py+0PTQhRTgrvfRP0nmEVOIoReZphxbauAMfyHBcAOw==); }
|
||||||
|
.icon-down { background-image: url(data:image/gif;base64,R0lGODlhEgASAIEAMe7u7gAAgJmZmQAAACH5BAEAAAEALAAAAAASABIAAQIghI+py+0PTQjxzCopvltX/lyix0wm2ZwdxraVAMfyHBcAOw==); }
|
||||||
|
.icon-plus { background-image: url(data:image/gif;base64,R0lGODlhEgASAIEAMe7u7gAAgJmZmQAAACH5BAEAAAEALAAAAAASABIAAQIhhI+py+0PTQjxzCopvm/6rykgCHGVGaFliLXuI8TyTMsFADs=); }
|
||||||
|
.icon-cross { background-image: url(data:image/gif;base64,R0lGODlhEgASAIEAMe7u7gAAgJmZmQAAACH5BAEAAAEALAAAAAASABIAAQIjhI+py+0PIwph1kZvfnnDLoFfd2GU4THnsUruC0fCTNc2XQAAOw==); }
|
||||||
|
#schema .arrow { height: 1.25em; background: url(data:image/gif;base64,R0lGODlhCAAKAIAAAICAgP///yH5BAEAAAEALAAAAAAIAAoAAAIPBIJplrGLnpQRqtOy3rsAADs=) no-repeat right center; }
|
||||||
|
|
||||||
.rtl h2 { margin: 0 -18px 20px 0; }
|
.rtl h2 { margin: 0 -18px 20px 0; }
|
||||||
.rtl p, .rtl table, .rtl .error, .rtl .message { margin: 1em 0 0 20px; }
|
.rtl p, .rtl table, .rtl .error, .rtl .message { margin: 1em 0 0 20px; }
|
||||||
.rtl .logout { left: 0; right: auto; }
|
.rtl .logout { left: 0; right: auto; }
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 79 B |
Binary file not shown.
Before Width: | Height: | Size: 80 B |
Binary file not shown.
Before Width: | Height: | Size: 79 B |
@@ -204,11 +204,8 @@ if (!$translations) {
|
|||||||
function minify_css($file) {
|
function minify_css($file) {
|
||||||
global $project;
|
global $project;
|
||||||
if ($project == "editor") {
|
if ($project == "editor") {
|
||||||
$file = preg_replace('~.*\.gif.*~', '', $file);
|
$file = preg_replace('~.*\.url\(.*~', '', $file);
|
||||||
}
|
}
|
||||||
$file = preg_replace_callback('~url\((\w+\.(gif))\)~', function ($match) {
|
|
||||||
return "url(data:image/$match[2];base64," . base64_encode(file_get_contents(__DIR__ . "/adminer/static/$match[1]")) . ")";
|
|
||||||
}, $file);
|
|
||||||
return lzw_compress(preg_replace('~\s*([:;{},])\s*~', '\1', preg_replace('~/\*.*?\*/\s*~s', '', $file)));
|
return lzw_compress(preg_replace('~\s*([:;{},])\s*~', '\1', preg_replace('~/\*.*?\*/\s*~s', '', $file)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user