[Pkg-javascript-commits] [jquery-minicolors] 02/15: put background image in class and base64 encoded it so that it doesn't have to be sourced by the css file. Added classes to necessary elements in the js file to use the background class.
David Prévot
taffit at moszumanska.debian.org
Wed Sep 3 16:34:47 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository jquery-minicolors.
commit e3a82b9e0ce5fb56bb1ee50cbd48c8833acd4e6b
Author: Matt <mattcurtis at gmail.com>
Date: Wed Aug 27 14:54:35 2014 -0400
put background image in class and base64 encoded it so that it doesn't have to be sourced by the css file. Added classes to necessary elements in the js file to use the background class.
---
jquery.minicolors.base64.css | 259 -------------------------------------------
jquery.minicolors.css | 12 +-
jquery.minicolors.js | 10 +-
3 files changed, 13 insertions(+), 268 deletions(-)
diff --git a/jquery.minicolors.base64.css b/jquery.minicolors.base64.css
deleted file mode 100644
index 6a15479..0000000
--- a/jquery.minicolors.base64.css
+++ /dev/null
@@ -1,259 +0,0 @@
-.minicolors {
- position: relative;
-}
-
-.minicolors-swatch {
- position: absolute;
- vertical-align: middle;
- background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAA2YAAACWCAYAAAC1r5t6AAEuWklEQVR42uz9a8xt25YVhrU+1ner7qseLiEjhERwfkDFeWAEl6dCQcAUCBDCwUSJwg+jRPIzgGVZMcZ2DCKyIycxiSOi2JbMr8hBgFNVGKNAHgKCTBnbUYCYEsHYIoiKKuYW9zzu2XvP0fNjjUfrbfQx5/r23ufWPnX2PvrOWmvOueYc87HmHG201luzv/GzvstvVmG4/3N39H8GAwzAnASHw8zgDpjRdAcOFPz0v/J1mvrm/374h3+48Oevfe1rOh/PnF/xdv+5TvgLf+EvLAv9vJ/38/ATsdzP/bk/l9tZ6c/l/XEyr8/3B9ZT3X07r/1hM/04+U62XW1X2ka/X9Rn63l0e33fHmnLbtvhONOxqiffw9m+9HW4+9h+X87dR5vbv4M+11prHW/mP3/16 [...]
- border: solid 1px #ccc;
- cursor: text;
- padding: 0;
- margin: 0;
- display: inline-block;
-}
-
-.minicolors-swatch-color {
- position: absolute;
- top: 0;
- left: 0;
- right: 0;
- bottom: 0;
-}
-
-.minicolors input[type=hidden] + .minicolors-swatch {
- width: 28px;
- position: static;
- cursor: pointer;
-}
-
-/* Panel */
-.minicolors-panel {
- position: absolute;
- width: 173px;
- height: 152px;
- background: white;
- border: solid 1px #CCC;
- box-shadow: 0 0 20px rgba(0, 0, 0, .2);
- z-index: 99999;
- -moz-box-sizing: content-box;
- -webkit-box-sizing: content-box;
- box-sizing: content-box;
- display: none;
-}
-
-.minicolors-panel.minicolors-visible {
- display: block;
-}
-
-/* Panel positioning */
-.minicolors-position-top .minicolors-panel {
- top: -154px;
-}
-
-.minicolors-position-right .minicolors-panel {
- right: 0;
-}
-
-.minicolors-position-bottom .minicolors-panel {
- top: auto;
-}
-
-.minicolors-position-left .minicolors-panel {
- left: 0;
-}
-
-.minicolors-with-opacity .minicolors-panel {
- width: 194px;
-}
-
-.minicolors .minicolors-grid {
- position: absolute;
- top: 1px;
- left: 1px;
- width: 150px;
- height: 150px;
- background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAA2YAAACWCAYAAAC1r5t6AAEuWklEQVR42uz9a8xt25YVhrU+1ner7qseLiEjhERwfkDFeWAEl6dCQcAUCBDCwUSJwg+jRPIzgGVZMcZ2DCKyIycxiSOi2JbMr8hBgFNVGKNAHgKCTBnbUYCYEsHYIoiKKuYW9zzu2XvP0fNjjUfrbfQx5/r23ufWPnX2PvrOWmvOueYc87HmHG201luzv/GzvstvVmG4/3N39H8GAwzAnASHw8zgDpjRdAcOFPz0v/J1mvrm/374h3+48Oevfe1rOh/PnF/xdv+5TvgLf+EvLAv9vJ/38/ATsdzP/bk/l9tZ6c/l/XEyr8/3B9ZT3X07r/1hM/04+U62XW1X2ka/X9Rn63l0e33fHmnLbtvhONOxqiffw9m+9HW4+9h+X87dR5vbv4M+11prHW/mP3/16 [...]
- cursor: crosshair;
-}
-
-.minicolors .minicolors-grid-inner {
- position: absolute;
- top: 0;
- left: 0;
- width: 150px;
- height: 150px;
- background: none;
-}
-
-.minicolors-slider-saturation .minicolors-grid {
- background-position: -420px 0;
-}
-
-.minicolors-slider-saturation .minicolors-grid-inner {
- background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAA2YAAACWCAYAAAC1r5t6AAEuWklEQVR42uz9a8xt25YVhrU+1ner7qseLiEjhERwfkDFeWAEl6dCQcAUCBDCwUSJwg+jRPIzgGVZMcZ2DCKyIycxiSOi2JbMr8hBgFNVGKNAHgKCTBnbUYCYEsHYIoiKKuYW9zzu2XvP0fNjjUfrbfQx5/r23ufWPnX2PvrOWmvOueYc87HmHG201luzv/GzvstvVmG4/3N39H8GAwzAnASHw8zgDpjRdAcOFPz0v/J1mvrm/374h3+48Oevfe1rOh/PnF/xdv+5TvgLf+EvLAv9vJ/38/ATsdzP/bk/l9tZ6c/l/XEyr8/3B9ZT3X07r/1hM/04+U62XW1X2ka/X9Rn63l0e33fHmnLbtvhONOxqiffw9m+9HW4+9h+X87dR5vbv4M+11prHW/mP3/16 [...]
-}
-
-.minicolors-slider-brightness .minicolors-grid {
- background-position: -570px 0;
-}
-
-.minicolors-slider-brightness .minicolors-grid-inner {
- background: black;
-}
-
-.minicolors-slider-wheel .minicolors-grid {
- background-position: -720px 0;
-}
-
-.minicolors-slider,
-.minicolors-opacity-slider {
- position: absolute;
- top: 1px;
- left: 152px;
- width: 20px;
- height: 150px;
- background: white url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAA2YAAACWCAYAAAC1r5t6AAEuWklEQVR42uz9a8xt25YVhrU+1ner7qseLiEjhERwfkDFeWAEl6dCQcAUCBDCwUSJwg+jRPIzgGVZMcZ2DCKyIycxiSOi2JbMr8hBgFNVGKNAHgKCTBnbUYCYEsHYIoiKKuYW9zzu2XvP0fNjjUfrbfQx5/r23ufWPnX2PvrOWmvOueYc87HmHG201luzv/GzvstvVmG4/3N39H8GAwzAnASHw8zgDpjRdAcOFPz0v/J1mvrm/374h3+48Oevfe1rOh/PnF/xdv+5TvgLf+EvLAv9vJ/38/ATsdzP/bk/l9tZ6c/l/XEyr8/3B9ZT3X07r/1hM/04+U62XW1X2ka/X9Rn63l0e33fHmnLbtvhONOxqiffw9m+9HW4+9h+X87dR5vbv4M+11prHW/ [...]
- cursor: row-resize;
-}
-
-.minicolors-slider-saturation .minicolors-slider {
- background-position: -60px 0;
-}
-
-.minicolors-slider-brightness .minicolors-slider {
- background-position: -20px 0;
-}
-
-.minicolors-slider-wheel .minicolors-slider {
- background-position: -20px 0;
-}
-
-.minicolors-opacity-slider {
- left: 173px;
- background-position: -40px 0;
- display: none;
-}
-
-.minicolors-with-opacity .minicolors-opacity-slider {
- display: block;
-}
-
-/* Pickers */
-.minicolors-grid .minicolors-picker {
- position: absolute;
- top: 70px;
- left: 70px;
- width: 12px;
- height: 12px;
- border: solid 1px black;
- border-radius: 10px;
- margin-top: -6px;
- margin-left: -6px;
- background: none;
-}
-
-.minicolors-grid .minicolors-picker > div {
- position: absolute;
- top: 0;
- left: 0;
- width: 8px;
- height: 8px;
- border-radius: 8px;
- border: solid 2px white;
- -moz-box-sizing: content-box;
- -webkit-box-sizing: content-box;
- box-sizing: content-box;
-}
-
-.minicolors-picker {
- position: absolute;
- top: 0;
- left: 0;
- width: 18px;
- height: 2px;
- background: white;
- border: solid 1px black;
- margin-top: -2px;
- -moz-box-sizing: content-box;
- -webkit-box-sizing: content-box;
- box-sizing: content-box;
-}
-
-/* Inline controls */
-.minicolors-inline {
- display: inline-block;
-}
-
-.minicolors-inline .minicolors-input {
- display: none !important;
-}
-
-.minicolors-inline .minicolors-panel {
- position: relative;
- top: auto;
- left: auto;
- box-shadow: none;
- z-index: auto;
- display: inline-block;
-}
-
-/* Default theme */
-.minicolors-theme-default .minicolors-swatch {
- top: 5px;
- left: 5px;
- width: 18px;
- height: 18px;
-}
-.minicolors-theme-default.minicolors-position-right .minicolors-swatch {
- left: auto;
- right: 5px;
-}
-.minicolors-theme-default.minicolors {
- width: auto;
- display: inline-block;
-}
-.minicolors-theme-default .minicolors-input {
- height: 20px;
- width: auto;
- display: inline-block;
- padding-left: 26px;
-}
-.minicolors-theme-default.minicolors-position-right .minicolors-input {
- padding-right: 26px;
- padding-left: inherit;
-}
-
-/* Bootstrap theme */
-.minicolors-theme-bootstrap .minicolors-swatch {
- top: 3px;
- left: 3px;
- width: 28px;
- height: 28px;
- border-radius: 3px;
-}
-.minicolors-theme-bootstrap .minicolors-swatch-color {
- border-radius: inherit;
-}
-.minicolors-theme-bootstrap.minicolors-position-right .minicolors-swatch {
- left: auto;
- right: 3px;
-}
-.minicolors-theme-bootstrap .minicolors-input {
- padding-left: 44px;
-}
-.minicolors-theme-bootstrap.minicolors-position-right .minicolors-input {
- padding-right: 44px;
- padding-left: 12px;
-}
-.minicolors-theme-bootstrap .minicolors-input.input-lg + .minicolors-swatch {
- top: 4px;
- left: 4px;
- width: 37px;
- height: 37px;
- border-radius: 5px;
-}
-.minicolors-theme-bootstrap .minicolors-input.input-sm + .minicolors-swatch {
- width: 24px;
- height: 24px;
-}
diff --git a/jquery.minicolors.css b/jquery.minicolors.css
index cdf4ae4..d8564b5 100644
--- a/jquery.minicolors.css
+++ b/jquery.minicolors.css
@@ -2,10 +2,14 @@
position: relative;
}
+.minicolors-background {
+ background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAA2YAAACWCAYAAAC1r5t6AAEuWklEQVR42uz9a8xt25YVhrU+1ner7qseLiEjhERwfkDFeWAEl6dCQcAUCBDCwUSJwg+jRPIzgGVZMcZ2DCKyIycxiSOi2JbMr8hBgFNVGKNAHgKCTBnbUYCYEsHYIoiKKuYW9zzu2XvP0fNjjUfrbfQx5/r23ufWPnX2PvrOWmvOueYc87HmHG201luzv/GzvstvVmG4/3N39H8GAwzAnASHw8zgDpjRdAcOFPz0v/J1mvrm/374h3+48Oevfe1rOh/PnF/xdv+5TvgLf+EvLAv9vJ/38/ATsdzP/bk/l9tZ6c/l/XEyr8/3B9ZT3X07r/1hM/04+U62XW1X2ka/X9Rn63l0e33fHmnLbtvhONOxqiffw9m+9HW4+9h+X87dR5vbv4M+11pr [...]
+}
+
.minicolors-swatch {
position: absolute;
vertical-align: middle;
- background: url(jquery.minicolors.png) -80px 0;
+ background-position: -80px 0;
border: solid 1px #ccc;
cursor: text;
padding: 0;
@@ -73,7 +77,7 @@
left: 1px;
width: 150px;
height: 150px;
- background: url(jquery.minicolors.png) -120px 0;
+ background-position: -120px 0;
cursor: crosshair;
}
@@ -91,7 +95,7 @@
}
.minicolors-slider-saturation .minicolors-grid-inner {
- background: url(jquery.minicolors.png) -270px 0;
+ background-position: -270px 0;
}
.minicolors-slider-brightness .minicolors-grid {
@@ -113,7 +117,7 @@
left: 152px;
width: 20px;
height: 150px;
- background: white url(jquery.minicolors.png) 0 0;
+ background: white 0 0;
cursor: row-resize;
}
diff --git a/jquery.minicolors.js b/jquery.minicolors.js
index 9196677..3ece73a 100644
--- a/jquery.minicolors.js
+++ b/jquery.minicolors.js
@@ -148,14 +148,14 @@ if(jQuery) (function($) {
.wrap(minicolors)
.after(
'<div class="minicolors-panel minicolors-slider-' + settings.control + '">' +
- '<div class="minicolors-slider">' +
+ '<div class="minicolors-slider minicolors-background">' +
'<div class="minicolors-picker"></div>' +
'</div>' +
- '<div class="minicolors-opacity-slider">' +
+ '<div class="minicolors-opacity-slider minicolors-background">' +
'<div class="minicolors-picker"></div>' +
'</div>' +
- '<div class="minicolors-grid">' +
- '<div class="minicolors-grid-inner"></div>' +
+ '<div class="minicolors-grid minicolors-background">' +
+ '<div class="minicolors-grid-inner minicolors-background"></div>' +
'<div class="minicolors-picker"><div></div></div>' +
'</div>' +
'</div>'
@@ -163,7 +163,7 @@ if(jQuery) (function($) {
// The swatch
if( !settings.inline ) {
- input.after('<span class="minicolors-swatch"><span class="minicolors-swatch-color"></span></span>');
+ input.after('<span class="minicolors-swatch minicolors-background"><span class="minicolors-swatch-color"></span></span>');
input.next('.minicolors-swatch').on('click', function(event) {
event.preventDefault();
input.focus();
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/jquery-minicolors.git
More information about the Pkg-javascript-commits
mailing list