Pre-compressing CSS with yui-compressor

This commit is contained in:
James Taylor
2009-07-13 13:08:52 -04:00
parent 56243cd613
commit ad85576fef
10 changed files with 31 additions and 1754 deletions
File diff suppressed because one or more lines are too long
+1 -117
View File
@@ -1,117 +1 @@
body
{
background: #C1C9E5;
color: #303030;
background-image: url(menu_bg.png);
background-repeat: repeat-x;
background-position: top;
margin: 5px;
border: 0;
padding: 0;
}
a
{
color: #base_text;
}
div.historyLinks
{
padding: 5px;
margin-top: 5px;
margin-bottom: 5px;
padding-right: 5px;
padding-left: 5px;
margin-bottom: 5px;
}
div.historyItem
{
margin-right: -5px;
margin-top: 5px;
margin-bottom: 5px;
padding: 5px;
padding-right: 11px;
border: solid #888888 1px;
border-left: solid #888888 5px;
border-right: none;
background: #EEEEEE;
background-image: url(gray_bg.png);
background-repeat: repeat-x;
background-position: top;
}
div.historyItem div.historyItem
{
margin-right: -11px;
}
div.historyItem-ok
{
border-color: #66AA66;
background: #CCFFCC;
/*
background-image: url(ok_bg.png);
background-repeat: repeat-x;
background-position: top;
*/
}
div.historyItem-error, div.historyItem-empty
{
border-color: #AA6666;
background: #FFCCCC;
/*
background-image: url(error_bg.png);
background-repeat: repeat-x;
background-position: top;
*/
}
div.historyItem-running
{
border-color: #AAAA66;
background: #FFFFCC;
/*
background-image: url(warn_bg.png);
background-repeat: repeat-x;
background-position: top;
*/
}
div.historyItem-upload
{
border-color: #6666AA;
background: #CCCCFF;
}
div.historyItem-noPermission
{
filter: alpha(opacity=60);
-moz-opacity: .60;
opacity: .60;
}
div.historyItem-queued
{
}
div.historyItemBody div
{
padding-top: 2px;
}
pre.peek
{
background: white;
color: black;
width: 100%;
overflow: auto;
}
pre.peek th
{
color: white;
background: #023858;
}
body{background:#C1C9E5;color:#303030;background-image:url(menu_bg.png);background-repeat:repeat-x;background-position:top;margin:5px;border:0;padding:0;}a{color:#base_text;}div.historyLinks{padding:5px;margin-top:5px;margin-bottom:5px;padding-right:5px;padding-left:5px;margin-bottom:5px;}div.historyItem{margin-right:-5px;margin-top:5px;margin-bottom:5px;padding:5px;padding-right:11px;border:solid #888 1px;border-left:solid #888 5px;border-right:none;background:#EEE;background-image:url(gray_bg.png);background-repeat:repeat-x;background-position:top;}div.historyItem div.historyItem{margin-right:-11px;}div.historyItem-ok{border-color:#6A6;background:#CFC;}div.historyItem-error,div.historyItem-empty{border-color:#A66;background:#FCC;}div.historyItem-running{border-color:#AA6;background:#FFC;}div.historyItem-upload{border-color:#66A;background:#CCF;}div.historyItem-noPermission{filter:alpha(opacity=60);-moz-opacity:.60;opacity:.60;}div.historyItemBody div{padding-top:2px;}pre.peek{background:white;color:black;width:100%;overflow:auto;}pre.peek th{color:white;background:#023858;}
File diff suppressed because one or more lines are too long
+1 -75
View File
@@ -1,75 +1 @@
.libraryRow {
background-color: #d2c099;
}
.datasetHighlighted {
background-color: #C1C9E5;
}
.libraryItemDeleted-True {
font-style: italic;
}
div.historyItemBody {
padding: 4px 4px 2px 4px;
}
li.folderRow,
li.datasetRow
{
border-top: solid 1px #ddd;
}
li.folderRow:hover,
li.datasetRow:hover
{
background-color: #C1C9E5;
}
img.expanderIcon {
padding-right: 4px;
}
input.datasetCheckbox,
li, ul
{
padding: 0;
margin: 0;
}
.rowTitle
{
padding: 2px;
}
ul {
list-style: none;
}
.libraryTitle th {
text-align: left;
}
pre.peek
{
background: white;
color: black;
width: 100%;
overflow: auto;
}
pre.peek th
{
color: white;
background: #023858;
}
a.expandLink {
text-decoration: none;
}
span.expandLink {
width: 100%;
height: 100%;
display: block;
}
.libraryRow{background-color:#d2c099;}.datasetHighlighted{background-color:#C1C9E5;}.libraryItemDeleted-True{font-style:italic;}div.historyItemBody{padding:4px 4px 2px 4px;}li.folderRow,li.datasetRow{border-top:solid 1px #ddd;}li.folderRow:hover,li.datasetRow:hover{background-color:#C1C9E5;}img.expanderIcon{padding-right:4px;}input.datasetCheckbox,li,ul{padding:0;margin:0;}.rowTitle{padding:2px;}ul{list-style:none;}.libraryTitle th{text-align:left;}pre.peek{background:white;color:black;width:100%;overflow:auto;}pre.peek th{color:white;background:#023858;}a.expandLink{text-decoration:none;}span.expandLink{width:100%;height:100%;display:block;}
+1 -62
View File
@@ -1,62 +1 @@
body
{
background: #2C3143 url(masthead_bg.png) bottom;
color: #eeeeee;
padding: 0;
border: 0;
margin: 3px;
margin-right: 5px;
margin-left: 5px;
overflow: hidden;
}
div.pageTitle
{
font-size: 175%;
font-weight: bold;
}
div.pageTitle a:link, div.pageTitle a:visited, div.pageTitle a:active, div.pageTitle a:hover
{
text-decoration: none;
}
a:link, a:visited, a:active
{
color: #eeeeee;
}
#tab-bar-bottom
{
z-index: -1;
position:absolute;
top:27px; left: 0;
width: 100%;
height: 100%;
background: #222532;
}
span.link-group
{
margin: 0;
padding: 0;
display: inline;
padding-bottom: 10px;
margin-bottom: -10px;
}
span.link-group span
{
margin: 0;
padding: 0;
display: inline;
}
span.link-group span.active-link
{
background: #222532;
padding-left: 3px; padding-right: 3px;
margin-left: -3px; margin-right: -3px;
padding-bottom: 10px;
margin-bottom: -10px;
}
body{background:#2C3143 url(masthead_bg.png) bottom;color:#eee;padding:0;border:0;margin:3px;margin-right:5px;margin-left:5px;overflow:hidden;}div.pageTitle{font-size:175%;font-weight:bold;}div.pageTitle a:link,div.pageTitle a:visited,div.pageTitle a:active,div.pageTitle a:hover{text-decoration:none;}a:link,a:visited,a:active{color:#eee;}#tab-bar-bottom{z-index:-1;position:absolute;top:27px;left:0;width:100%;height:100%;background:#222532;}span.link-group{margin:0;padding:0;display:inline;padding-bottom:10px;margin-bottom:-10px;}span.link-group span{margin:0;padding:0;display:inline;}span.link-group span.active-link{background:#222532;padding-left:3px;padding-right:3px;margin-left:-3px;margin-right:-3px;padding-bottom:10px;margin-bottom:-10px;}
+1 -340
View File
@@ -1,340 +1 @@
body, html
{
overflow: hidden;
margin: 0;
padding: 0;
width: 100%;
height: 100%;
}
body
{
font: 75% verdana, "Bitstream Vera Sans", geneva, arial, helvetica, helve, sans-serif;
background: #eee;
}
#background
{
position: absolute;
background: #eee;
z-index: -1;
top: 0;
left: 0;
margin: 0;
padding: 0;
width: 100%;
height: 100%;
}
#messagebox
{
position:absolute;
top:33px;
left:0;
width:100%;
height:24px !important;
overflow: hidden;
border-bottom: solid #999 1px;
font-size: 90%;
}
#left, #left-border, #center, #right-border, #right
{
position: absolute;
top: 39px;
bottom: 0px;
overflow: hidden;
background: #fff;
}
#left, #center, #right
{
border-top: solid #999 1px;
}
#left-border, #right-border
{
background: #eeeeee;
border-left: solid #999 1px;
border-right: solid #999 1px;
padding-right: 1px;
padding-left: 1px;
width: 5px;
z-index: 10000;
}
#left-border div, #right-border div
{
width: 100%;
height: 100%;
background-repeat: no-repeat;
background-position: center center;
position: absolute;
width: 5px;
height: 100%;
}
#left-border div, #right-border.hidden div
{
background-image: url(tiny_arrow_left.png);
cursor: w-resize;
}
#left-border.hidden div, #right-border div
{
background-image: url(tiny_arrow_right.png);
cursor: e-resize;
}
#left-border.hover div, #right-border.hover div
{
background-color: #AAAAEE;
}
#left
{
left: 0px;
width: 250px;
z-index: 200;
}
#left-border
{
left: 250px;
}
#center
{
left:259px;
right: 259px;
overflow: hidden;
z-index: 1;
}
#right-border
{
right: 250px;
}
#right
{
width: 250px;
right: 0px;
z-index: 200;
}
.unified-panel-header {
height: 2em;
z-index: 1000;
background: #cccccc;
background-image: url(panel_header_bg.png);
background-position: top center;
background-repeat: repeat-x;
border-bottom: solid #999 1px;
margin: 0;
padding: 0;
padding-right: 10px;
padding-left: 10px;
color: #333;
font-weight: bold;
user-select: none;
-moz-user-select: none;
-webkit-user-select: none;
}
.unified-panel-header-inner {
padding-top: 0.45em;
}
.menu-bg {
background: #C1C9E5 url(menu_bg.png) top repeat-x;
}
div.unified-panel-body {
position: absolute;
top: 2em;
bottom: 0;
width: 100%;
margin-top: 1px;
}
.panel-header-button {
color: #333;
text-decoration: none;
display: inline-block;
cursor: pointer;
margin: -1px; padding: 1px;
border: 0px;
padding-right: 0.5em;
padding-left: 0.5em;
-moz-border-radius: 0.5em;
-webkit-border-radius: 0.5em;
border-radius: 0.5em;
background: transparent;
}
.panel-header-button:hover {
color: black;
background: #aaaaaa;
}
.panel-header-button:active {
color: white;
background: #aaaaaa;
}
#overlay {
position: fixed;
top: 0; left: 0; width: 100%; height: 100%;
z-index: 20000;
}
.dialog-box-container {
position: relative;
margin-top: 80px;
margin-right: auto;
margin-left: auto;
}
.dialog-box-wrapper {
position: relative;
padding: 1em;
background-color: rgba(0,0,0,0.5);
-moz-border-radius: 1em;
-webkit-border-radius: 1em;
}
.dialog-box {
border: solid #999 1px;
background: white;
min-width: 230px;
z-index: 80000;
}
.dialog-box .body, .dialog-box .buttons {
padding: 5px;
}
.panel-error-message, .panel-warning-message, .panel-done-message, .panel-info-message
{
height: 24px;
line-height: 24px;
color: #303030;
padding: 0px;
padding-left: 26px;
background-color: #FFCCCC;
background-image: url(error_small.png);
background-repeat: no-repeat;
background-position: 6px 50%;
}
.panel-warning-message
{
background-image: url(warn_small.png);
background-color: #FFFFCC;
}
.panel-done-message
{
background-image: url(done_small.png);
background-color: #CCFFCC;
}
.panel-info-message
{
background-image: url(info_small.png);
background-color: #CCCCFF;
}
#masthead
{
position:absolute;
top:0;
left:0;
width:100%;
height:32px;
background: #2C3143;
color:#fff;
border-bottom: solid #444 1px;
z-index: 15000;
padding: 0;
}
#masthead a
{
color: #eeeeee;
}
#masthead .title
{
padding: 3px 10px;
font-size: 175%;
font-weight: bold;
}
#masthead a
{
text-decoration: none;
}
#masthead a:hover
{
text-decoration: underline;
}
.tab-group
{
margin: 0;
padding: 0 10px;
height: 100%;
white-space: nowrap;
-moz-user-select: none;
-khtml-user-select: none;
user-select: none;
cursor: default;
}
.tab-group .tab
{
background: #2C3143;
position: relative;
display: block;
float: left;
margin: 0;
padding: 0 1em;
height: 32px;
line-height: 32px;
text-align: left;
}
.tab-group .tab:hover > a
{
color: gold !important;
}
.tab-group .active
{
background: rgb(1,1,1);
}
.tab-group .tab .submenu {
display: none;
position: absolute;
z-index: 16000;
left: 0;
top: 32px;
padding: 1em;
margin: -1em;
padding-top: 0;
margin-top: 0;
background-color: rgba(0,0,0,0.5);
-moz-border-radius: 0 0 1em 1em;
-webkit-border-bottom-right-radius: 1em;
-webkit-border-bottom-left-radius: 1em;
}
.tab-group .tab .submenu ul
{
display: block;
margin: 0;
padding: 0;
list-style-type: none;
background: #2C3143;
}
.tab-group .tab .submenu ul li
{
display: block;
padding: 0 1em;
white-space: nowrap;
}
body,html{overflow:hidden;margin:0;padding:0;width:100%;height:100%;}body{font:75% verdana,"Bitstream Vera Sans",geneva,arial,helvetica,helve,sans-serif;background:#eee;}#background{position:absolute;background:#eee;z-index:-1;top:0;left:0;margin:0;padding:0;width:100%;height:100%;}#messagebox{position:absolute;top:33px;left:0;width:100%;height:24px!important;overflow:hidden;border-bottom:solid #999 1px;font-size:90%;}#left,#left-border,#center,#right-border,#right{position:absolute;top:39px;bottom:0;overflow:hidden;background:#fff;}#left,#center,#right{border-top:solid #999 1px;}#left-border,#right-border{background:#eee;border-left:solid #999 1px;border-right:solid #999 1px;padding-right:1px;padding-left:1px;width:5px;z-index:10000;}#left-border div,#right-border div{width:100%;height:100%;background-repeat:no-repeat;background-position:center center;position:absolute;width:5px;height:100%;}#left-border div,#right-border.hidden div{background-image:url(tiny_arrow_left.png);cursor:w-resize;}#left-border.hidden div,#right-border div{background-image:url(tiny_arrow_right.png);cursor:e-resize;}#left-border.hover div,#right-border.hover div{background-color:#AAE;}#left{left:0;width:250px;z-index:200;}#left-border{left:250px;}#center{left:259px;right:259px;overflow:hidden;z-index:1;}#right-border{right:250px;}#right{width:250px;right:0;z-index:200;}.unified-panel-header{height:2em;z-index:1000;background:#ccc;background-image:url(panel_header_bg.png);background-position:top center;background-repeat:repeat-x;border-bottom:solid #999 1px;margin:0;padding:0;padding-right:10px;padding-left:10px;color:#333;font-weight:bold;}.unified-panel-header-inner{padding-top:.45em;}.menu-bg{background:#C1C9E5 url(menu_bg.png) top repeat-x;}div.unified-panel-body{position:absolute;top:2em;bottom:0;width:100%;margin-top:1px;}.panel-header-button{color:#333;text-decoration:none;display:inline-block;cursor:pointer;margin:-1px;padding:1px;border:0;padding-right:.5em;padding-left:.5em;-moz-border-radius:.5em;-webkit-border-radius:.5em;border-radius:.5em;background:transparent;}.panel-header-button:hover{color:black;background:#aaa;}.panel-header-button:active{color:white;background:#aaa;}#overlay{position:fixed;top:0;left:0;width:100%;height:100%;z-index:20000;}.dialog-box-container{position:relative;margin-top:80px;margin-right:auto;margin-left:auto;}.dialog-box-wrapper{position:relative;padding:1em;background-color:rgba(0,0,0,0.5);-moz-border-radius:1em;-webkit-border-radius:1em;}.dialog-box{border:solid #999 1px;background:white;min-width:230px;z-index:80000;}.dialog-box .body,.dialog-box .buttons{padding:5px;}.panel-error-message,.panel-warning-message,.panel-done-message,.panel-info-message{height:24px;line-height:24px;color:#303030;padding:0;padding-left:26px;background-color:#FCC;background-image:url(error_small.png);background-repeat:no-repeat;background-position:6px 50%;}.panel-warning-message{background-image:url(warn_small.png);background-color:#FFC;}.panel-done-message{background-image:url(done_small.png);background-color:#CFC;}.panel-info-message{background-image:url(info_small.png);background-color:#CCF;}#masthead{position:absolute;top:0;left:0;width:100%;height:32px;background:#2C3143;color:#fff;border-bottom:solid #444 1px;z-index:15000;padding:0;}#masthead a{color:#eee;}#masthead .title{padding:3px 10px;font-size:175%;font-weight:bold;}#masthead a{text-decoration:none;}#masthead a:hover{text-decoration:underline;}.tab-group{margin:0;padding:0 10px;height:100%;white-space:nowrap;cursor:default;user-select:none;-moz-user-select:none;-webkit-user-select:none;}.tab-group .tab{background:#2C3143;position:relative;float:left;margin:0;padding:0 1em;height:32px;line-height:32px;text-align:left;}.tab-group .tab:hover>a{color:gold!important;}.tab-group .active{background:#010101;}.tab-group .tab .submenu{display:none;position:absolute;z-index:16000;left:0;top:32px;padding:1em;margin:-1em;padding-top:0;margin-top:0;background-color:rgba(0,0,0,0.5);-moz-border-radius:0 0 1em 1em;-webkit-border-bottom-right-radius:1em;-webkit-border-bottom-left-radius:1em;}.tab-group .tab .submenu ul{display:block;margin:0;padding:0;list-style-type:none;background:#2C3143;}.tab-group .tab .submenu ul li{display:block;padding:0 1em;white-space:nowrap;}
+1 -3
View File
@@ -1,3 +1 @@
/* Copyright (c) 2008, Yahoo! Inc. All rights reserved. */
body{font:13px/1.231 arial,helvetica,clean,sans-serif;*font-size:small;*font:x-small;}select,input,button,textarea{font:99% arial,helvetica,clean,sans-serif;}table{font-size:inherit;font:100%;}pre,code,kbd,samp,tt{font-family:monospace;*font-size:108%;line-height:100%;}
/*body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,textarea,p,blockquote,th,td{margin:0;padding:0;}table{border-collapse:collapse;border-spacing:0;}fieldset,img{border:0;}address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal;}ol,ul {list-style:none;}caption,th {text-align:left;}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal;}q:before,q:after{content:'';}abbr,acronym {border:0;}*/
body{font:13px/1.231 arial,helvetica,clean,sans-serif;*font-size:small;*font:x-small;}select,input,button,textarea{font:99% arial,helvetica,clean,sans-serif;}table{font-size:inherit;font:100%;}pre,code,kbd,samp,tt{font-family:monospace;*font-size:108%;line-height:100%;}
+1 -69
View File
@@ -1,69 +1 @@
body
{
background: white;
color: #303030;
background: #C1C9E5 url(menu_bg.png) top repeat-x;
margin: 5px;
margin-right: 10px;
margin-left: 10px;
}
hr
{
border: none;
height: 0px;
margin-top: 0px;
}
div.toolSectionPad
{
margin: 0;
padding: 0;
height: 5px;
font-size: 0px;
}
div.toolSectionDetailsInner
{
margin-left: 5px;
margin-right: 5px;
}
div.toolSectionTitle
{
font-weight: bold;
}
div.toolPanelLabel
{
padding-top: 10px;
padding-bottom: 5px;
font-weight: bold;
color: gray;
text-transform: uppercase;
}
div.toolTitle
{
padding-top: 5px;
padding-bottom: 5px;
margin-left: 16px;
margin-right: 10px;
display: list-item;
list-style: square outside;
}
div.toolSectionBody div.toolPanelLabel
{
padding-top: 5px;
padding-bottom: 5px;
margin-left: 16px;
margin-right: 10px;
display: list-item;
list-style: none outside;
}
div.toolTitleNoSection
{
padding-bottom: 0px;
}
body{background:white;color:#303030;background:#C1C9E5 url(menu_bg.png) top repeat-x;margin:5px;margin-right:10px;margin-left:10px;}hr{border:none;height:0;margin-top:0;}div.toolSectionPad{margin:0;padding:0;height:5px;font-size:0;}div.toolSectionDetailsInner{margin-left:5px;margin-right:5px;}div.toolSectionTitle{font-weight:bold;}div.toolPanelLabel{padding-top:10px;padding-bottom:5px;font-weight:bold;color:gray;text-transform:uppercase;}div.toolTitle{padding-top:5px;padding-bottom:5px;margin-left:16px;margin-right:10px;display:list-item;list-style:square outside;}div.toolSectionBody div.toolPanelLabel{padding-top:5px;padding-bottom:5px;margin-left:16px;margin-right:10px;display:list-item;list-style:none outside;}div.toolTitleNoSection{padding-bottom:0;}
+13 -2
View File
@@ -4,7 +4,7 @@
#import pkg_resources
#pkg_resources.require("Cheetah")
import sys, string, os.path
import sys, string, os.path, tempfile, subprocess
#from galaxy import eggs
import pkg_resources
pkg_resources.require( "Cheetah" )
@@ -73,7 +73,18 @@ for line in open( vars ):
for input, output in templates:
print input ,"->", output
open( os.path.join( out_dir, output ), "w" ).write( str( Template( file=input, searchList=[context] ) ) )
out_fname = os.path.join( out_dir, output )
temp_file = tempfile.NamedTemporaryFile()
# Write processed template to temporary file
print "Processing template..."
temp_file.write( str( Template( file=input, searchList=[context] ) ) )
temp_file.flush()
# Compress CSS with YUI
print "Compressing..."
subprocess.call(
"java -jar ../../scripts/yuicompressor.jar --type css %s -o %s" % ( temp_file.name, out_fname ),
shell = True )
"""
for rule, output in images:
+10 -8
View File
@@ -1,3 +1,11 @@
#set $unselectable = """
user-select: none;
-moz-user-select: none;
-webkit-user-select: none;
"""
## Rules
body, html
{
overflow: hidden;
@@ -124,9 +132,6 @@ body
padding-left: 10px;
color: #333;
font-weight: bold;
user-select: none;
-moz-user-select: none;
-webkit-user-select: none;
}
.unified-panel-header-inner {
@@ -281,17 +286,14 @@ div.unified-panel-body {
padding: 0 10px;
height: 100%;
white-space: nowrap;
-moz-user-select: none;
-khtml-user-select: none;
user-select: none;
cursor: default;
${unselectable}
}
.tab-group .tab
{
background: ${masthead_bg};
background: ${masthead_bg};
position: relative;
display: block;
float: left;
margin: 0;
padding: 0 1em;