multitoys / cssmin Goto Github PK
View Code? Open in Web Editor NEWAutomatically exported from code.google.com/p/cssmin
Automatically exported from code.google.com/p/cssmin
Hi,
It needs CssParser Class. Where can i find it please ?
Original issue reported on code.google.com by [email protected]
on 9 Aug 2010 at 10:25
What version of CssMin are you using (source and/or build)?
3.0.0
What was the input stylesheet and/or configuration options?
ConvertLevel3Properties enabled
What is the expected result?
`display: box` is converted to `display: box; display: -moz-box; display:
-webkit-box`
And what is the actual result and/or error message?
`display: box` is not converted
Please provide any additional information below.
Original issue reported on code.google.com by mattcg
on 8 Nov 2011 at 4:19
What version of CssMin are you using (source and/or build)?
3.0.1
What was the input stylesheet and/or configuration options?
Rules like:
@-ms-keyframes 'message-show-hide' {
25% {
-ms-transform:translate(0, 48px);
}
60% {
-ms-transform:translate(0, 48px);
}
70% {
-ms-transform:translate(0, 48px);
}
80% {
-ms-transform:translate(0, 48px);
}
90% {
-ms-transform:translate(0, -36px);
}
100% {
-ms-transform:translate(0, -48px);
}
}
@-o-keyframes 'message-show-hide' {
25% {
-o-transform:translate(0, 48px);
}
60% {
-o-transform:translate(0, 48px);
}
70% {
-o-transform:translate(0, 48px);
}
80% {
-o-transform:translate(0, 48px);
}
90% {
-o-transform:translate(0, -36px);
}
100% {
-o-transform:translate(0, -48px);
}
}
What is the expected result?
@-ms-keyframes "message-show-hide"{25%{-ms-transform:translate(0,
48px);}60%{-ms-transform:translate(0, 48px);}70%{-ms-transform:translate(0,
48px);}80%{-ms-transform:translate(0, 48px);}90%{-ms-transform:translate(0,
-36px);}100%{-ms-transform:translate(0, -48px);}}
And what is the actual result and/or error message?
@-ms-keyframes "message-show-hide"{25%{-ms-transform:translate(0,
48px);}60%{-ms-transform:translate(0, 48px);}70%{-ms-transform:translate(0,
48px);}80%{-ms-transform:translate(0, 48px);}90%{-ms-transform:translate(0,
-36px);}100%{-ms-transform:translate(0, -48px);}
Please provide any additional information below.
Missing last bracket. Results in parsing error in Chrome.
Original issue reported on code.google.com by audvare
on 19 Jan 2012 at 3:01
What version of CssMin are you using (source and/or build)?
Version 3.0.0
What was the input stylesheet and/or configuration options?
@font-face
{
font-family: "MyFont";
src: url("webfont.eot");
src: url("webfont.eot?#iefix") format("embedded-opentype"),
url("webfont.woff") format("woff"),
url("webfont.ttf") format("truetype"),
url("webfont.svg#MyFont") format("svg");
font-weight: normal;
font-style: normal;
}
What is the expected result?
@font-face{font-family:"MyFont";src:url("webfont.eot");src:url("webfont.eot?#ief
ix") format("embedded-opentype"),url("webfont.woff")
format("woff"),url("webfont.ttf") format("truetype"),url("webfont.svg#MyFont")
format("svg");font-weight:400;font-style:normal}
And what is the actual result and/or error message?
@font-face{font-family:"MyFont";src:url("webfont.eot");src:url("webfont.eot?#ief
ix") format("embedded-opentype"),
url("webfont.woff") format("woff"),
url("webfont.ttf") format("truetype"),
url("webfont.svg#MyFont") format("svg");font-weight:400;font-style:normal}
Original issue reported on code.google.com by joe.scylla
on 13 Jul 2011 at 8:50
.cke_skin_kama textarea.cke_dialog_ui_input_textarea
{
background-color: white;
border: none;
padding: 0px;
width: 100%;
/*
* IE6 BUG: Scrollbars in textareas can overflow even if the outer DIV is set to overflow:hidden.
* So leave 1% width for the scrollbar. In most situations the 1% isn't noticeable by users.
*/
_width: 99%;
overflow: auto;
resize: none;
}
is transformed in :
.cke_skin_kama
textarea.cke_dialog_ui_input_textarea{background-color:white;border:none;padding
:0px;width:100%;
With the following message :
Notice: Undefined offset: 7 in C:\Program Files\Apache Software
Foundation\Apache2.2\htdocs\_minify\include\cssmin\cssmin.php on line 399 Call
Stack: 0.0024 375192 1. {main}() C:\Program Files\Apache Software
Foundation\Apache2.2\htdocs\_minify\index.php:0 0.2211 1699104 2.
CssMin::minify() C:\Program Files\Apache Software
Foundation\Apache2.2\htdocs\_minify\index.php:12
PHP 5.3 on XP
Original issue reported on code.google.com by [email protected]
on 10 Aug 2010 at 11:55
I already wrote a CSS minifier by myself including this functionality. It loops
through a filelist, reads the content line by line and recursively reads the
content of all @import lines. Additionally it corrects all of the relative urls.
Perhaps you can take over my code with the changes you need in order to adjust
it to your project. The only thing what I want to ask for is to mention my name
and website (http://danielvogt.info) to the comment area of your file. Here are
the methods that I use:
protected function parseRecursive($fileName)
{
$output = '';
$content = file_get_contents($fileName);
// all line breaks to \n
$content = str_replace("\r\n", "\n", $content);
$content = str_replace("\r", "\n", $content);
// read line by line and parse the @include calls
$contentLines = explode("\n", $content);
foreach ($contentLines as $line) {
$line = trim($line);
$line = $this->correctRelativeUrls($fileName, $line);
if (stristr($line, '@import url(')) {
$urlToParse = self::stringFromTo($line, 'url(', ')');
$line = $this->parseRecursive($urlToParse);
}
$output .= $line;
}
return $output;
}
protected function correctRelativeUrls($fileName, $line)
{
if (!stristr($line, 'url(')) {
return $line;
}
$relPath = trim($this->stringFromTo($line, 'url(', ')'));
if (substr($relPath, 0, 1)=='/') {
$absoluteFilePath = $relPath;
} else {
$dir = dirname($fileName);
$absoluteFilePath = $dir.'/'.$relPath;
}
$realPath = str_replace("\\", '/', realpath($absoluteFilePath));
if (stristr($line, '@import url(')) {
return str_replace($relPath, $realPath, $line);
}
return str_replace($relPath, str_replace($_SERVER['DOCUMENT_ROOT'], '', $realPath), $line);
}
public static function stringFromTo ($string, $from, $to = "")
{
if ($from == "") {
$start = 0;
} else {
$start = strpos($string, $from);
if ($start !== false) {
$start += strlen($from);
}
}
if ($to == "") {
$end = strlen($string) + 1;
} else {
$end = strpos($string, $to, $start);
}
if ($end === false) {
$end = strlen($string) + 1;
}
return substr($string, $start, $end - $start);
}
And here is the loop through the files:
$output = '';
foreach ($fileList as $file) {
$output .= $this->parseRecursive($file);
}
Best,
Daniel Vogt
Original issue reported on code.google.com by [email protected]
on 30 Sep 2010 at 12:41
This CSS property generate an error:
_filter:
progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/shared/images/shadow/to
p.png', sizingMethod='scale');
In the code, it check for filter property but not for "hacked" property _filter
*filter -ms-filter
It is better in the condition to do like that (use of strpos):
// Fix for Internet Explorer declaration filter as the declaration value
conrains a colon (Ex.: progid:DXImageTransform.Microsoft.Alpha(Opacity=85);)
if (strpos(strtolower($property), "filter")!==false &&
strtolower(trim($buffer)) == "progid:")
Original issue reported on code.google.com by [email protected]
on 9 Mar 2011 at 2:26
CSSMin 2.0.2.1 (correct)
{{{
#ru-writer-unit ARTICLE #go2 H3 {
font-size:.8571em;
line-height:1.75em;
margin:1.75em 0 0 0;
color:#777777;
}
a.minibutton {
padding:0 0 0 3px;
}
}}}
CSSMin 3.0 beta 7 with (incorrect)
{{{
#ru-writer-unit ARTICLE #go2 H3 {
font-size:.8571em;
line-height:1.75em;
margin:1.75em 0;
color:#777777;
}
a.minibutton {
padding:0 3px;
}
}}}
Original issue reported on code.google.com by [email protected]
on 15 Mar 2011 at 9:45
What version of CssMin are you using (source and/or build)?
v. 3.0.1 Build
Please provide any additional information below.
If the file is not in its own directory (eg it is a lib dir with other files)
it tries to load all the files too, to use, I had to comment out
"CssMin::initialise();" to make it work.
Original issue reported on code.google.com by [email protected]
on 2 Dec 2011 at 12:14
What steps will reproduce the problem?
1. INPUT: ul.comma > li:not(:only-child):after{content:", ";}
2. Minify
3. OUTPUT: ul.comma > li:not(:only-child):after{content:",";}
What is the expected output? What do you see instead?
ul.comma > li:not(:only-child):after{content:", ";}
See above.
What version of the product are you using? On what operating system?
1.0
OS X 10.5
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 2 Apr 2009 at 6:21
What version of CssMin are you using (source and/or build)?
v 2.0.2.2
What was the input stylesheet and/or configuration options?
background-image:url('data:image/jpeg;base64,/9j/......//2Q%3D%3D')!important;
What is the expected result?
background-image:url(data:image/jpeg;base64,/9j/4AAQ......//2Q%3D%3D)!important;
And what is the actual result and/or error message?
background-image:url(/data:image/jpeg;base64,/9j/4AAQ......//2Q%3D%3D)!important;
Please provide any additional information below.
Adding the "/" before data alters the URL and causes embed base 64 encoded
files to fail loading.
Original issue reported on code.google.com by [email protected]
on 9 Apr 2011 at 10:46
What version of CssMin are you using (source and/or build)?
3.0.0
What was the input stylesheet and/or configuration options?
CompressUnitValues
What is the expected result?
border-radius:7px 0 0 0;
And what is the actual result and/or error message?
border-radius:7px 0;
Please provide any additional information below.
The 'compression' is not equivalent to the original. This leads to the
bottom-right corner getting a 7px border-radius when the intention was that
only the top-right corner get one.
Original issue reported on code.google.com by audvare
on 16 Oct 2011 at 1:18
I have the following in the CSS file:
@font-face {
font-family: "FuturaBook";
src: url("../other/futura-book-webfont.eot");
src: local("☺"),
url("../other/futura-book-webfont.woff") format("woff"),
url("../other/futura-book-webfont.ttf") format("truetype"),
url("../other/futura-book-webfont.svg#webfontFGT2JwHV") format("svg");
font-weight: normal;
font-style: normal;
}
I am getting the following as output:
@charset "utf-8";@font-face{font-family:"FuturaBook";src:url("../other/futura-book-webfont.eot");src:local("☺"),;url("../other/futura-book-webfont.woff") format("woff"),
url("../other/futura-book-webfont.ttf") format("truetype"),
url("../other/futura-book-webfont.svg#webfontFGT2JwHV") format("svg");
font-weight:normal;font-style:normal}
The issue is after local("☺"), it is adding adding an extra semicolon which
is completely messing everything up.
I am using the following in my PHP:
$config = array();
CssMin::minify($str, $config);
CssMin Version: 2.0.2.0079.beta2
System OS: Ubuntu 9.10
PHP Version 5.3.5
I can provide any other info you may need, just ask :)
Original issue reported on code.google.com by [email protected]
on 2 Feb 2011 at 12:09
What version of CssMin are you using (source and/or build)?
v3.0.0.b7
Original issue reported on code.google.com by joe.scylla
on 13 Jul 2011 at 7:09
What steps will reproduce the problem?
1. Run CSSmin on the attached site.css
What is the expected output? What do you see instead?
A smaller file size.
I see a file that is larger than the original, exactly:
orig: 39440 / min: 42959
ratio: 108.9224137931%
What version of the product are you using? On what operating system?
Latest on OS X.
Please provide any additional information below.
Attached is the original file and the 'minified' file that CSSmin generated.
Original issue reported on code.google.com by [email protected]
on 12 Aug 2010 at 2:40
Attachments:
CssMin 2.0.2.1
Option compress-unit-values by fault collapses:
background-position: 0px 0px;
as:
background-position:0;
At a first glance, this seems acceptable, *but* it is contradictory to the W3C
specs.
According to the specs, background-position *must* take two parameters, and if
one is ommitted, the second parameter *should* be considered to be 50%, not at
all 0px. ;-)
Browsers confirmed to follow the specs (and thus breaking on CssMin-ified css)
include Chromium 10.x, Chromium 11.x, Firefox 3.6.x and Firefox 4rc2.
I have not tested this on CssMin v3.
Hope this helps! :-)
Original issue reported on code.google.com by [email protected]
on 22 Mar 2011 at 1:47
The comments in 2.x and 3.x mention "Firefox < 3.5", but -moz-opacity is
actually from the Firefox < 0.9 days.
Firefox >= 3.5 ignores this alias completely.
See: https://developer.mozilla.org/en/CSS/opacity
(The comments should generally mention the last version which requires it - not
the last version which supports it.)
Original issue reported on code.google.com by [email protected]
on 27 Feb 2011 at 4:26
What steps will reproduce the problem?
1. INPUT: ul.comma > li:not(:only-child):after{content:", ";}
2. Minify
3. OUTPUT: ul.comma > li:not(:only-child):after{content:",";}
What is the expected output? What do you see instead?
ul.comma > li:not(:only-child):after{content:", ";}
See above.
What version of the product are you using? On what operating system?
1.0
OS X 10.5
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 2 Apr 2009 at 6:21
What version of CssMin are you using (source and/or build)?
3.0.0
What was the input stylesheet and/or configuration options?
A big one.
What is the expected result?
One without some -moz and -ms prefixes, some of which are specific to IE 10 and
Firefox > 5.0.
Please provide any additional information below.
IE 10 supports many CSS 3 things with the -ms prefix.
Original issue reported on code.google.com by audvare
on 15 Oct 2011 at 10:30
What version of CssMin are you using (source and/or build)?
3
What was the input stylesheet and/or configuration options?
default
What is the expected result?
if the last declaration in a css string is a @-webkit-keyframes declaration,
the last "}" is omitted from the output:
@-webkit-keyframes bounce_circle
{
0%
{
opacity:0.3;
}
50%
{
opacity:1;
background-color:#111
}
100%
{
opacity:0.3;
}
}
And what is the actual result and/or error message?
@-webkit-keyframes bounce_circle{0% {
opacity:0.3}50%{opacity:1;background-color:#111}100%{opacity:0.3}
Please provide any additional information below.
As you can see that last "}" is left out. This only occurs if that is the last
declaration in the css string. if there is another declaration after that,
everything looks fine.
Original issue reported on code.google.com by [email protected]
on 18 Aug 2011 at 7:11
I'm debugging something inside a library which uses your library and I came
around to notice that you use trigger_error() to elavate issues from your code.
I assume that you trigger_error() to not halt the code, but trigger_error
pollutes log files and I think unless I implement a custom error handler to
handle E_USER_WARNING from your code, there's no way for me to collect these
errors or even handle them - or disregard them entirely.
So instead of using trigger_error() in your code, I'd like to propose some form
of global error object or maybe a class variable which collects all errors, and
in the end, I can ask with hasError() and getErrors() to see them.
Would you be open to this?
class CssMin_Errors
{
/**
* @var array
*/
protected $errors;
/**
* @return CssMin_Errors
*/
public static function getInstance();
/**
* @param string $error
* @return $this
*/
public function push($error);
/**
* @return boolean
*/
public function is();
/**
* @return array
*/
public function get();
public function __toString();
}
Original issue reported on code.google.com by [email protected]
on 2 Aug 2011 at 8:32
What steps will reproduce the problem?
Insert commented code such as:
/*float: left; /* Comments */
What is the expected output? What do you see instead?
Should be removed but get an error and the css is truncated
What version of the product are you using? On what operating system?
cssmin-v2.0.1.0061.php
Please provide any additional information below.
Seems the /* inside the comment is not handled correctly
Original issue reported on code.google.com by [email protected]
on 28 Aug 2010 at 10:19
What version of CssMin are you using (source and/or build)?
2.0.2.1 (build)
What was the input stylesheet and/or configuration options?
Added configuration option: boolean remove-comments, default true
What is the expected result?
If disabled don't remove comments
Please provide any additional information below.
It is practical to use functions like 'import_imports' etc. but for debugging
to see comments
Original issue reported on code.google.com by [email protected]
on 4 Mar 2011 at 3:03
Attachments:
What version of CssMin are you using (source and/or build)?
2.0.2 and 3.0.0
What was the input stylesheet and/or configuration options?
default and ("remove-empty-blocks" => false, "remove-empty-rulesets" =>
false,"remove-last-semicolons"=>false)
What is the expected result?
@-webkit-keyframes css code remains function
And what is the actual result and/or error message?
breaks syntax
Please provide any additional information below.
Example CSS that is breaking by CSSMIN:
@-webkit-keyframes 'fade-in' {
from { opacity: 0; }
99% { opacity: 1; }
to { }
}
@-webkit-keyframes 'slide-in' {
from { -webkit-transform: translateX(100%); }
99% { -webkit-transform: translateX(0); }
to { }
}
@-webkit-keyframes 'slide-in-reverse' {
from { -webkit-transform: translateX(-100%); }
99% { -webkit-transform: translateX(0); }
to { }
}
@-webkit-keyframes 'slide-out' {
from { -webkit-transform: translateX(0); }
99% { -webkit-transform: translateX(-100%); }
to { }
}
@-webkit-keyframes 'slide-out-reverse' {
from { -webkit-transform: translateX(0); }
99% { -webkit-transform: translateX(100%); }
to { }
}
Original issue reported on code.google.com by [email protected]
on 27 Feb 2011 at 10:15
if (substr($m[1], 1, 1) == substr($m[1], 2, 1) && substr($m[1], 3, 1) ==
substr($m[1], 4, 1) && substr($m[1], 5, 1) == substr($m[1], 6, 1))
should like blew
if (substr($m[1], 0, 1) == substr($m[1], 1, 1) && substr($m[1], 2, 1) ==
substr($m[1], 3, 1) && substr($m[1], 4, 1) == substr($m[1], 5, 1))
Original issue reported on code.google.com by [email protected]
on 12 Aug 2010 at 10:30
What version of CssMin are you using (source and/or build)?
3.0.1
What was the input stylesheet and/or configuration options?
@keyframes rotateThis {
from { transform: rotate(0deg); }
to { transform: rotate(360deg); }
}
What is the expected result?
...
@-moz-keyframes rotateThis {
from { transform: rotate(0deg); }
to { transform: rotate(360deg); }
}
...
And what is the actual result and/or error message?
...
@-moz-keyframes "rotateThis" {
from { transform: rotate(0deg); }
to { transform: rotate(360deg); }
}
...
Please provide any additional information below.
Adding these quotes to the name of the keyframe breaks the animation in firefox.
Tested in Firefox 7.0.1
Also effects the CSS Formatters.
Original issue reported on code.google.com by [email protected]
on 16 Nov 2011 at 11:11
PHP Warning: Invalid argument supplied for foreach() in CssMin.php on line 116
Original issue reported on code.google.com by [email protected]
on 9 Jun 2011 at 4:42
What version of CssMin are you using?
3.0.0.b3 BUILD & SOURCE version
And what is the actual result and/or error message?
Warning: get_class() expects parameter 1 to be object, null given in
D:\devel\www\_minify\include\cssmin\minifier\filter\CssRemoveEmptyRulesetsMinifi
erFilter.php on line 25
Please provide any additional information below.
Here are the tokens :
Array
(
[0] => Array
(
[Selectors] => Array
(
[0] => body
)
)
[1] => Array
(
[Property] => width
[IsImportant] =>
[IsLast] =>
[MediaTypes] => Array
(
[0] => all
)
[Value] => 300px
)
[2] => Array
(
[Property] => margin
[IsImportant] =>
[IsLast] =>
[MediaTypes] => Array
(
[0] => all
)
[Value] => auto
)
[3] => Array
(
)
[4] => Array
(
[Selectors] => Array
(
[0] => .bouton
)
)
[5] => Array
(
[Property] => width
[IsImportant] =>
[IsLast] =>
[MediaTypes] => Array
(
[0] => all
)
[Value] => 296px
)
[6] => Array
(
[Property] => height
[IsImportant] =>
[IsLast] =>
[MediaTypes] => Array
(
[0] => all
)
[Value] => 48px
)
[7] => Array
(
[Property] => margin
[IsImportant] =>
[IsLast] =>
[MediaTypes] => Array
(
[0] => all
)
[Value] => 20px 0px 0px 0px
)
[8] => Array
(
[Property] => padding
[IsImportant] =>
[IsLast] =>
[MediaTypes] => Array
(
[0] => all
)
[Value] => 7px 0px 0px 0px
)
[9] => Array
(
[Property] => background-image
[IsImportant] =>
[IsLast] =>
[MediaTypes] => Array
(
[0] => all
)
[Value] => url(../img/btn.png)
)
[10] => Array
(
[Property] => background-position
[IsImportant] =>
[IsLast] =>
[MediaTypes] => Array
(
[0] => all
)
[Value] => top left
)
[11] => Array
(
[Property] => background-repeat
[IsImportant] =>
[IsLast] =>
[MediaTypes] => Array
(
[0] => all
)
[Value] => no-repeat
)
[12] => Array
(
[Property] => font-family
[IsImportant] =>
[IsLast] =>
[MediaTypes] => Array
(
[0] => all
)
[Value] => Verdana, Arial, Helvetica, sans-serif
)
[13] => Array
(
[Property] => font-size
[IsImportant] =>
[IsLast] =>
[MediaTypes] => Array
(
[0] => all
)
[Value] => 24px
)
[14] => Array
(
[Property] => font-style
[IsImportant] =>
[IsLast] =>
[MediaTypes] => Array
(
[0] => all
)
[Value] => normal
)
[15] => Array
(
[Property] => font-weight
[IsImportant] =>
[IsLast] =>
[MediaTypes] => Array
(
[0] => all
)
[Value] => bold
)
[16] => Array
(
[Property] => text-transform
[IsImportant] =>
[IsLast] =>
[MediaTypes] => Array
(
[0] => all
)
[Value] => none
)
[17] => Array
(
[Property] => color
[IsImportant] =>
[IsLast] =>
[MediaTypes] => Array
(
[0] => all
)
[Value] => #ffffff
)
[18] => Array
(
[Property] => text-decoration
[IsImportant] =>
[IsLast] =>
[MediaTypes] => Array
(
[0] => all
)
[Value] => none
)
[19] => Array
(
[Property] => text-align
[IsImportant] =>
[IsLast] =>
[MediaTypes] => Array
(
[0] => all
)
[Value] => center
)
[20] => Array
(
[Property] => cursor
[IsImportant] =>
[IsLast] =>
[MediaTypes] => Array
(
[0] => all
)
[Value] => pointer
)
[21] => Array
(
)
[22] => Array
(
[Selectors] => Array
(
[0] => .bouton:hover
)
)
[23] => Array
(
[Property] => background-image
[IsImportant] =>
[IsLast] =>
[MediaTypes] => Array
(
[0] => all
)
[Value] => url(../img/btn_over.png)
)
[24] => Array
(
)
[25] => Array
(
[Selectors] => Array
(
[0] => .bouton:active
)
)
[26] => Array
(
[Property] => background-image
[IsImportant] =>
[IsLast] =>
[MediaTypes] => Array
(
[0] => all
)
[Value] => url(../img/btn_active.png)
)
[27] => Array
(
)
)
Original issue reported on code.google.com by [email protected]
on 23 Feb 2011 at 9:20
Attachments:
Hi,
i have your great cssmin running on a website in the version 2.0.2.1. Sience
the last update i got this message on the website:
Warning: Line #613: Unterminated declaration: padding-bottom: 0px_ in
plugins/cssmin/cssmin.php on line 1612
I checked all included css files for a wrong padding-bottom definition but
there is no wrong one.
# grep 'padding-bottom' *
layout_standard.css: padding-bottom: 20px;
layout_standard.css: padding-bottom: 6px;
layout_standard.css: padding-bottom: 5px;
layout_standard.css: padding-bottom: 0px
layout_standard.css: padding-bottom: 0px
layout_standard.css: padding-bottom: 4px;
layout_standard.css: padding-bottom: 20px;
layout_standard.css: padding-bottom: 8px;
layout_standard.css: padding-bottom: 8px;
layout_standard.css: padding-bottom: 0px;
layout_standard.css: padding-bottom: 12px;
layout_standard.css: padding-bottom: 0px;
layout_standard.css: padding-bottom: 30px;
layout_standard.css: padding-bottom: 3px;
layout_standard.css: padding-bottom: 20px;
layout_standard.css: padding-bottom: 7px;
Do you have an idea why this happens?
thanks and greetings from austria
Leo
Original issue reported on code.google.com by leo.unglaub
on 11 Mar 2011 at 10:26
What steps will reproduce the problem?
1. enter @CHARSET "UTF-8"; at the beginning of a file
2. minify
3. Open file in Firefox 3.5.
What is the expected output? What do you see instead?
The First rule of the file is not rendered, presumably because
FF expects some whitespace after the declaration. It is assumed
this also applies to similar declarations such as @import.
What version of the product are you using? On what operating system?
Both cssmin-v1.0.1.b3.php cssmin_v.1.0.php
Original issue reported on code.google.com by [email protected]
on 19 Feb 2010 at 1:27
What steps will reproduce the problem?
1. use a url() expression in your css, say, a background style (ex.
background:url(sprite.png);
2. use the preserve-urls option
3. minify
What is the expected output? What do you see instead?
- Expected for background portion: background:url(sprite.png);
- Instead seeing: background:url(YzNCeWFYUmxMbkJ1Wnc9PQ==);
What version of the product are you using? On what operating system?
1.0.1.b3 (2008-10-02) on Windows and Linux
Please provide any additional information below.
FIX FOUND:
----------
The Problem:
------------
seems to be a typo - basically the cssmin process for preserving urls is to
base64_encode them, then perform minification, then base64_decode those
urls. BUT, when it performs the decode step, it actually performs another
encode... the errant line of code in the version noted above is line 72:
$css = preg_replace_callback("/url\s*\((.*)\)/siU", "cssmin_encode_url", $css);
The Solution:
-------------
Line 72 should be: (notice the precise name of the callback function)
$css = preg_replace_callback("/url\s*\((.*)\)/siU", "cssmin_decode_url", $css);
That resolves the problem.
Original issue reported on code.google.com by [email protected]
on 13 May 2009 at 7:10
PHP Error
=========
array_combine(): Both parameters should have at least 1 element (code 2)
Details
=======
Error on file '/home/sanz/workspace/saltos/code/lib/cssmin/cssmin-v2.0.2.php'
at line 595
Fixed with
==========
if(count($config)) $config = array_combine(array_map("trim",
array_map("strtolower", array_keys($config))), array_values($config));
URL test
========
https://localhost.localdomain/saltos/code/xml.php?action=cache&files=lib/jqu
ery/jquery.tooltip.css,lib/jquery/jquery.colorpicker.css,lib/jquery/jquery.ptTim
eSelect.css,lib/jquery/jquery.jgrowl.css,&r=3657
Original issue reported on code.google.com by joe.scylla
on 18 Feb 2011 at 9:35
IE5 (five!) and up supports overflow-x and overflow-y. IE8 added (not replaced)
those two prefixed aliases/synonyms. Since the regular ones were added to CSS3,
the prefixed versions don't serve any purpose anymore.
See: https://developer.mozilla.org/en/CSS/overflow-x
I suggest to replace the two affected lines with a comment.
Original issue reported on code.google.com by [email protected]
on 19 Feb 2011 at 1:35
Hi,
What would be very nice is to return the css with the properties ordered in
alphbetical order. This will help to reduce the size of the file once
gzipped.
Best regards
Daniel
Original issue reported on code.google.com by [email protected]
on 1 Sep 2009 at 1:51
I was super excited to find Issue #16 where the addition of @import support is
discussed. I was able to deduce how to make it work based on those comments and
the diff for r83
However, I would have found all this much earlier if the new options had been
documented at http://code.google.com/p/cssmin/wiki/Configuration
Thanks for considering it, and for maintaining this helpful library!
Jim
Original issue reported on code.google.com by [email protected]
on 18 Feb 2011 at 7:26
What version of CssMin are you using (source and/or build)?
3.0.1
What was the input stylesheet and/or configuration options?
@keyframes rotateThis {
from { transform: rotate(0deg); }
to { transform: rotate(360deg); }
}
using CssWhitesmithsFormatter or CssOtbsFormatter
and enabling ConvertLevel3AtKeyframes
What is the expected result?
@keyframes, @-moz-keyframes and @-webkit-keyframes sections to be included in
the output
And what is the actual result and/or error message?
@keyframes section is repeated three times
Please provide any additional information below.
CssOtbsFormatter.php line 51 and CssWhitesmithsFormatter.php line 52 both hardcode "@keyframes".
Changing this to "@".$token->AtRuleName returns the expected result.
Original issue reported on code.google.com by [email protected]
on 11 Nov 2011 at 11:22
What version of CssMin are you using?
3.0.0.b2
And what is the actual result and/or error message?
Fatal error: Class 'CssMinifier' not found in
D:\devel\www\_minify\include\cssmin\CssMin.php on line 147
Please provide any additional information below.
I'm trying with the source version.
Is there something i need to declare for the autoload ?
Original issue reported on code.google.com by [email protected]
on 22 Feb 2011 at 3:17
What version of CssMin are you using (source and/or build)?
3.0.1
What was the input stylesheet and/or configuration options?
@keyframes "rotateThis" {
from { transform: rotate(0deg) }
to { transform: rotate(360deg) }
}
Enable ConvertLevel3Properties
What is the expected result?
@keyframes "rotateThis" {
from { transform: rotate(0deg); -moz-transform: rotate(0deg); -webkit-transform: rotate(0deg); -o-transform: rotate(0deg) }
to { transform: rotate(360deg); -moz-transform: rotate(360deg); -webkit-transform: rotate(360deg); -o-transform: rotate(360deg) }
}
And what is the actual result and/or error message?
@keyframes "rotateThis" {
from { transform: rotate(0deg) }
to { transform: rotate(360deg) }
}
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 11 Nov 2011 at 12:08
; just before } are not necessary and without them the stylesheet is still
valid.
Original issue reported on code.google.com by [email protected]
on 31 Aug 2008 at 11:33
What version of CssMin are you using (source and/or build)?
2.0.2.2
What was the input stylesheet and/or configuration options?
Input was given in a very development friendly format.
What is the expected result?
h1 *{font:normal 26px "Trebuchet
MS",tahoma,arial;padding:0;color:#748FA5;line-height:35px;margin:0 0 10px}
And what is the actual result and/or error message?
h1
*{font-size:26px;padding:0;font-weight:normal;color:#748FA5;line-height:35px;fon
t-family:"Trebuchet MS", tahoma,
arial;margin-top:0;margin-right:0;margin-bottom:10px;margin-left:0}
Please provide any additional information below.
Simply 76 bytes data is still there in just one rule. You can trim white space
between two font names, combine font-weight, font-family and font-size
properties. Also when margin-top, margin-right, margin-bottom, margin-left is
used, you can safely combine to make one property (as shows in above). Same
applies to padding.
I hope this gets considered soon because 76 bytes left from being trimmed from
just one rule is just too much for me to ignore.
Also if these issues are considered for next releases, it would become very
easy for us to maintain a very developer friendly and long explained CSS file
on the server, that gets served in just few thousand bytes.
Otherwise, this is a good script and I just downloaded it for using for the
first time.
Original issue reported on code.google.com by [email protected]
on 5 Jun 2011 at 7:32
What version of CssMin are you using (source and/or build)?
3.0.0
What was the input stylesheet and/or configuration options?
A big one.
What is the expected result?
opacity is not converted to filter/-ms-filter without explicit option saying so.
And what is the actual result and/or error message?
opacity is converted to filter.
Please provide any additional information below.
The reasoning is simple: filter sucks! The site performance decreases,
sometimes it affects layout, and combinations of filter:alpha(opacity=x) look
terrible (meaning a div behind a div), which is unlike opacity. Therefore,
filter:alpha(opacity=X) != opacity:0.X;
I would like to see something like a ConvertOpacityToMsFilter option. FALSE by
default. Until then, I have commented out the 3 lines that convert opacity to
filter/-ms-filter because it greatly affects my site's performance and look,
especially in IE7.
Original issue reported on code.google.com by audvare
on 15 Oct 2011 at 10:34
What steps will reproduce the problem?
.x-panel-body {display: block}
.x-panel-reset { display: block; }
What is the expected output?
x-panel-body{display:block}.x-panel-reset { display:block}
What do you see instead?
x-panel-body{display:block;.x-panel-reset { display:block}
What version of the product are you using? On what operating system?
2.0.0.b3
Please provide any additional information below.
If the css is described in 1 line and there is no ; before }, the output is
wrong : there is a ; instead of }
Original issue reported on code.google.com by [email protected]
on 9 Aug 2010 at 11:04
What steps will reproduce the problem?
1. Run cssmin.php against test.css
What is the expected output? What do you see instead?
Expected output "E F{border:1px solid red;}"
Actual output "EF{border: 1px solid red;}"
What version of the product are you using? On what operating system?
The only released version as of today. Running on any operating system running
PHP5.x
Please provide any additional information below.
The regular expressions lifted straight from jsmin.php are not suitable for css
minification. They
are removing tabs (the whitespace between the E and F selectors) and not
correctly removing
whitespace surrounding colons). I suspect there are very many more errors that
this small,
individual test case does not reveal.
Original issue reported on code.google.com by [email protected]
on 14 Jul 2008 at 11:57
Attachments:
What steps will reproduce the problem?
1. Create a CSS file with a rule like the following:
td[scope=row] p { ... }
2. Run css thru cssmin
What is the expected output? What do you see instead?
Expected:
td[scope=row] p{ ... }
Actual:
td[scope=row]p{ ... }
The actual result breaks the CSS rule ( tested in FF 3 )
What version of the product are you using? On what operating system?
1.0.1.b3 (2008-10-02)
Please provide any additional information below.
Here's a diff of the fix ( the revision numbers correspond to my local SVN
repo ):
Index: cssmin.php
===================================================================
--- cssmin.php (revision 42961)
+++ cssmin.php (working copy)
@@ -59,7 +59,7 @@ (root):cssmin(class):minify(function)
// Replace multiple to single space
$css = preg_replace("/\s\s+/", " ", $css);
// Remove unneeded spaces
- $css = preg_replace("/\s*({|}|\[|\]|=|~|\+|>|\||;|:|,)\s*/", "$1", $css);
+ $css = preg_replace("/\s*({|}|\[|=|~|\+|>|\||;|:|,)\s*/", "$1", $css);
if (in_array("remove-last-semicolon", $options))
{
// Removes the last semicolon of every style definition
Original issue reported on code.google.com by [email protected]
on 6 Jan 2009 at 8:09
What steps will reproduce the problem?
1. Minify CSS containing an URL with 'preserve-urls' option
What is the expected output? What do you see instead?
Url is not preserved. Instead, it is encoded in bas64 twice.
What version of the product are you using? On what operating system?
r5
Please provide any additional information below.
Here is the bug:
<code>
if (in_array("preserve-urls", $options))
{
// Decode url()
$css = preg_replace_callback("/url\s*\((.*)\)/siU", "cssmin_encode_url", $css);
}
</code>
Should be:
<code>
if (in_array("preserve-urls", $options))
{
// Decode url()
$css = preg_replace_callback("/url\s*\((.*)\)/siU", "cssmin_decode_url", $css);
}
</code>
Otherwise nice work!
Original issue reported on code.google.com by [email protected]
on 16 Jul 2010 at 10:49
What version of CssMin are you using (source and/or build)?
2.0.2.2 (occurred in earlier versions as well)
What was the input stylesheet and/or configuration options?
The CSS in question looks like this:
@font-face
{
font-family: 'MyFont';
src: url('webfont.eot');
src: url('webfont.eot?#iefix') format('embedded-opentype'),
url('webfont.woff') format('woff'),
url('webfont.ttf') format('truetype'),
url('webfont.svg#MyFont') format('svg');
font-weight: normal;
font-style: normal;
}
The CssMin options used were:
array("convert-color-values"=>true,
"compress-color-values"=>true,
"compress-unit-values"=>true)
What is the expected result?
CSS that is valid and results in fonts displaying.
And what is the actual result and/or error message?
IE 9 worked as expected. FireFox 5 failed to render the font. Opera 11.11
fails to render and gives the error "Declaration syntax error". Reviewing the
generated CSS file, I see the above cited CSS was transformed into the
following:
@font-face{font-family:'MyFont';src:url('webfont.eot');src:url('webfont.eot?#ief
ix') format('embedded-opentype'),;url('webfont.woff') format('woff'),
url('webfont.ttf') format('truetype'),
url('webfont.svg#MyFont') format('svg');
font-weight:normal;font-style:normal}
Note the inappropriate semicolon after "('embedded-opentype')".
Please provide any additional information below.
I was able to avoid the problem if I put all of the urls on the same line
instead of line breaking after each comma. This makes the original CSS
difficult to read, however.
The original CSS cited above works as expected in all browsers when not
minified.
I did not note the same problem if I broke up other declarations across lines.
Admittedly, the other things I tried did not include commas. E.g.:
border: 5px
solid
red;
Original issue reported on code.google.com by [email protected]
on 25 Jun 2011 at 5:57
I report 2 bugs detected when update the cssmin library in my project SaltOS:
=============================================================================
PHP Error
=========
array_combine(): Both parameters should have at least 1 element (code 2)
Details
=======
Error on file '/home/sanz/workspace/saltos/code/lib/cssmin/cssmin-v2.0.2.php'
at line 595
Fixed with
==========
if(count($config)) $config = array_combine(array_map("trim",
array_map("strtolower", array_keys($config))), array_values($config));
URL test
========
https://localhost.localdomain/saltos/code/xml.php?action=cache&files=lib/jqu
ery/jquery.tooltip.css,lib/jquery/jquery.colorpicker.css,lib/jquery/jquery.ptTim
eSelect.css,lib/jquery/jquery.jgrowl.css,&r=3657
=============================================================================
PHP Error
=========
Line #17: Unterminated declaration: left: expression( ( 0 - jGrowl.offsetWidth
+ ( document.documentElement.clientWidth ? document.documentElement.clientWidth
: document.body.clientWidth ) + ( ignoreMe2 =
document.documentElement.scrollLeft ? document.documentElement.scrollLeft :
document.body.scrollLeft ) ) + 'px' );_ (code 512)
Details
=======
Error on file '/home/sanz/workspace/saltos/code/lib/cssmin/cssmin-v2.0.2.php'
at line 1581
Comments
========
I don't know how fix this bug because the problem is related to the parser (and
it's a lot of complex!!!). I attach the CSS file that cause the problem. The
minify is called without a config argument (non used to force the default
configuration).
URL test
========
https://localhost.localdomain/saltos/code/xml.php?action=cache&files=lib/jqu
ery/jquery.jgrowl.css,&r=3657
=============================================================================
Josep Sanz
SaltOS Team
Original issue reported on code.google.com by [email protected]
on 17 Feb 2011 at 9:28
Attachments:
What version of CssMin are you using?
3.0.0.b2 BUILD Version
And what is the actual result and/or error message?
Fatal error: Cannot redeclare class aCssRightCurlyBraceToken in
D:\devel\www\_minify\include\cssmin\cssmin.php on line 34
Please provide any additional information below.
I'm using CssMin like this :
$minified = CssMin::minify($content, $this->cssmin_filters,
$this->cssmin_plugins);
Original issue reported on code.google.com by [email protected]
on 23 Feb 2011 at 8:24
What version of CssMin are you using (source and/or build)?
v3.0.0 build
What was the input stylesheet and/or configuration options?
Stylesheet:
.parentclass .childclass {color: rgb(20,20,20); }
Standard configuration - no additional parameters.
What is the expected result?
.parentclass .childclass{color: rgb(20,20,20);}
And what is the actual result and/or error message?
.parentclass.childclass{color: rgb(20,20,20);}
Please provide any additional information below.
This breaks the above CSS selector.
.parentclass .childclass{} means: elements with a class of .childclass that are
descendants of .parentclass
The resulting .parentclass.childclass{} means: elements that have both
.parentclass and .childclass
Original issue reported on code.google.com by [email protected]
on 19 Jul 2011 at 9:50
What version of CssMin are you using (source and/or build)?
2.0.2.1
Please provide any additional information below.
It would be great to have an option to rewrite urls in a stylesheet. In simple
cases, a "url-prefix" option could be sufficient.
Imagine that the source stylesheet is contained in a different directory than
the target one, and you want to use the source css for development and the
minified css in the release version.
Original issue reported on code.google.com by [email protected]
on 14 Mar 2011 at 12:45
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.