Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

CSS file cleanup - added minimized CSS file

Updated related build files
  • Loading branch information...
commit 06029b6e3e31a675d373139412514e9344c09e34 1 parent 489309a
@tapmodo authored
View
10 build/minimize-css.bash
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+echo 'Running Jcrop CSS minimization script'
+
+MYDATE=`date +"%Y%m%d"`
+JCVER=`head js/jquery.Jcrop.js|grep Jcrop.js`
+MYBUILD=`echo "$JCVER (build:$MYDATE)"`
+echo "$MYBUILD */" | sed -e 's/^.*jquery\.Jcrop\.js/\/\* jquery.Jcrop.min.css/' > css/jquery.Jcrop.min.css
+csstidy css/jquery.Jcrop.css --silent=true --template=high --sort_properties=true >> css/jquery.Jcrop.min.css
+git add css/jquery.Jcrop.min.css
View
0  build/minimize.bash → build/minimize-js.bash
File renamed without changes
View
10 build/pre-commit.bash
@@ -6,6 +6,14 @@ then
echo 'No changes made to Jcrop javascript'
else
echo 'Building minimized Jcrop javascript file'
- bash build/minimize.bash
+ bash build/minimize-js.bash
+fi
+
+if git diff --no-ext-diff --cached --exit-code css/jquery.Jcrop.css > /dev/null
+then
+ echo 'No changes made to Jcrop CSS file'
+else
+ echo 'Building minimized Jcrop CSS file'
+ bash build/minimize-css.bash
fi
View
116 css/jquery.Jcrop.css
@@ -1,82 +1,37 @@
-/* jquery.Jcrop.css
- The code contained in this file is free software under MIT License
- Copyright (c)2008-2012 Tapmodo Interactive LLC
-*/
+/* jquery.Jcrop.css v0.9.9 - MIT License */
/*
The outer-most container in a typical Jcrop instance
If you are having difficulty with formatting related to styles
on a parent element, place any fixes here or in a like selector
+
+ You can also style this element if you want to add a border, etc
+ A better method for styling can be seen below with .jcrop-light
+ (Add a class to the holder and style elements for that extended class)
*/
.jcrop-holder {
direction: ltr;
text-align: left;
}
-.jcrop-vline, .jcrop-hline {
- background: white url('Jcrop.gif') top left repeat;
- font-size: 0px;
- position: absolute;
-}
-
-.jcrop-vline {
- height: 100%;
- width: 1px !important;
-}
+/* These styles define the border lines */
+.jcrop-vline,.jcrop-hline{background:#FFF url(Jcrop.gif) top left repeat;font-size:0;position:absolute;}
+.jcrop-vline{height:100%;width:1px!important;}
+.jcrop-hline{height:1px!important;width:100%;}
+.jcrop-vline.right{right:0;}
+.jcrop-hline.bottom{bottom:0;}
-.jcrop-hline {
- width: 100%;
- height: 1px !important;
-}
+/* Handle style - size is set by Jcrop handleSize option (currently) */
+.jcrop-handle{background-color:#333;border:1px #eee solid;font-size:1px;}
-.jcrop-vline.right {
- right: 0px;
-}
-
-.jcrop-hline.bottom {
- bottom: 0px;
-}
-
-.jcrop-handle {
- background-color: #333;
- border: 1px #eee solid;
- font-size: 1px;
-}
-
-.jcrop-tracker {
+/* This style is used for invisible click targets */
+.jcrop-tracker
+{
height: 100%;
+ width: 100%;
-webkit-tap-highlight-color: transparent; /* "turn off" link highlight */
-webkit-touch-callout: none; /* disable callout, image save panel */
-webkit-user-select: none; /* disable cut copy paste */
- width: 100%;
-}
-
-.jcrop-light .jcrop-vline, .jcrop-light .jcrop-hline {
- background: white;
- filter: Alpha(opacity=70) !important;
- opacity: .70 !important;
-}
-
-.jcrop-light .jcrop-handle {
- background-color: black;
- border-color: white;
- border-radius: 3px;
- -moz-border-radius: 3px;
- -webkit-border-radius: 3px;
-}
-
-.jcrop-dark .jcrop-vline, .jcrop-dark .jcrop-hline {
- background: black;
- filter: Alpha(opacity=70) !important;
- opacity: 0.70 !important;
-}
-
-.jcrop-dark .jcrop-handle {
- background-color: white;
- border-color: black;
- border-radius: 3px;
- -moz-border-radius: 3px;
- -webkit-border-radius: 3px;
}
/* Positioning of handles and drag bars */
@@ -88,9 +43,42 @@
.jcrop-handle.ord-ne{margin-right:-4px;margin-top:-4px;right:0;top:0;}
.jcrop-handle.ord-se{bottom:0;margin-bottom:-4px;margin-right:-4px;right:0;}
.jcrop-handle.ord-sw{bottom:0;left:0;margin-bottom:-4px;margin-left:-4px;}
-.jcrop-dragbar.ord-n,.jcrop-dragbar.ord-s{height:9px;width:100%;}
-.jcrop-dragbar.ord-e,.jcrop-dragbar.ord-w{height:100%;width:9px;}
+.jcrop-dragbar.ord-n,.jcrop-dragbar.ord-s{height:7px;width:100%;}
+.jcrop-dragbar.ord-e,.jcrop-dragbar.ord-w{height:100%;width:7px;}
.jcrop-dragbar.ord-n{margin-top:-4px;}
.jcrop-dragbar.ord-s{bottom:0;margin-bottom:-4px;}
.jcrop-dragbar.ord-e{margin-right:-4px;right:0;}
.jcrop-dragbar.ord-w{margin-left:-4px;}
+
+/* The "jcrop-light" class/extension */
+.jcrop-light .jcrop-vline,.jcrop-light .jcrop-hline
+{
+ background:#FFF;
+ filter:Alpha(opacity=70)!important;
+ opacity:.70!important;
+}
+.jcrop-light .jcrop-handle
+{
+ -moz-border-radius:3px;
+ -webkit-border-radius:3px;
+ background-color:#000;
+ border-color:#FFF;
+ border-radius:3px;
+}
+
+/* The "jcrop-dark" class/extension */
+.jcrop-dark .jcrop-vline,.jcrop-dark .jcrop-hline
+{
+ background:#000;
+ filter:Alpha(opacity=70)!important;
+ opacity:.7!important;
+}
+.jcrop-dark .jcrop-handle
+{
+ -moz-border-radius:3px;
+ -webkit-border-radius:3px;
+ background-color:#FFF;
+ border-color:#000;
+ border-radius:3px;
+}
+
View
27 css/jquery.Jcrop.min.css
@@ -0,0 +1,27 @@
+/* jquery.Jcrop.min.css v0.9.9 (build:20120109) */
+.jcrop-holder{direction:ltr;text-align:left;}
+.jcrop-vline,.jcrop-hline{background:#FFF url(Jcrop.gif) top left repeat;font-size:0;position:absolute;}
+.jcrop-vline{height:100%;width:1px!important;}
+.jcrop-hline{height:1px!important;width:100%;}
+.jcrop-vline.right{right:0;}
+.jcrop-hline.bottom{bottom:0;}
+.jcrop-handle{background-color:#333;border:1px #eee solid;font-size:1px;}
+.jcrop-tracker{-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none;-webkit-user-select:none;height:100%;width:100%;}
+.jcrop-handle.ord-n{left:50%;margin-left:-4px;margin-top:-4px;top:0;}
+.jcrop-handle.ord-s{bottom:0;left:50%;margin-bottom:-4px;margin-left:-4px;}
+.jcrop-handle.ord-e{margin-right:-4px;margin-top:-4px;right:0;top:50%;}
+.jcrop-handle.ord-w{left:0;margin-left:-4px;margin-top:-4px;top:50%;}
+.jcrop-handle.ord-nw{left:0;margin-left:-4px;margin-top:-4px;top:0;}
+.jcrop-handle.ord-ne{margin-right:-4px;margin-top:-4px;right:0;top:0;}
+.jcrop-handle.ord-se{bottom:0;margin-bottom:-4px;margin-right:-4px;right:0;}
+.jcrop-handle.ord-sw{bottom:0;left:0;margin-bottom:-4px;margin-left:-4px;}
+.jcrop-dragbar.ord-n,.jcrop-dragbar.ord-s{height:7px;width:100%;}
+.jcrop-dragbar.ord-e,.jcrop-dragbar.ord-w{height:100%;width:7px;}
+.jcrop-dragbar.ord-n{margin-top:-4px;}
+.jcrop-dragbar.ord-s{bottom:0;margin-bottom:-4px;}
+.jcrop-dragbar.ord-e{margin-right:-4px;right:0;}
+.jcrop-dragbar.ord-w{margin-left:-4px;}
+.jcrop-light .jcrop-vline,.jcrop-light .jcrop-hline{background:#FFF;filter:Alpha(opacity=70)!important;opacity:.70!important;}
+.jcrop-light .jcrop-handle{-moz-border-radius:3px;-webkit-border-radius:3px;background-color:#000;border-color:#FFF;border-radius:3px;}
+.jcrop-dark .jcrop-vline,.jcrop-dark .jcrop-hline{background:#000;filter:Alpha(opacity=70)!important;opacity:.7!important;}
+.jcrop-dark .jcrop-handle{-moz-border-radius:3px;-webkit-border-radius:3px;background-color:#FFF;border-color:#000;border-radius:3px;}
Please sign in to comment.
Something went wrong with that request. Please try again.