lupuswwww / cssmin

Automatically exported from code.google.com/p/cssmin
0 stars 0 forks source link

ConvertLevel3Properties not applied to properties inside keyframes #47

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
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 l...@lukeblaney.co.uk on 11 Nov 2011 at 12:08

GoogleCodeExporter commented 8 years ago
I've made a rough patch which fixes this test case, but haven't tested it 
rigorously.

Original comment by l...@lukeblaney.co.uk on 11 Nov 2011 at 12:11

Attachments:

GoogleCodeExporter commented 8 years ago
Thanks for reporting.

Original comment by joe.scylla on 16 Nov 2011 at 11:14

GoogleCodeExporter commented 8 years ago
I ran into a similar issue. @keyframes should create the following:

`@-moz-keyframes
@-ms-keyframes
@-o-keyframes
@-webkit-keyframes`

And inside these, the only conversion should be from the property that needs 
transformation plus the original. For example, there should not be:

`@-webkit-keyframes {
  from {
    -moz-transform:rotate(1deg);
    -ms-transform:rotate(1deg);
    -o-transform:rotate(1deg);
    -webkit-transform:rotate(1deg);
    transform:rotate(1deg);
  }
  ...
}`

There should only be:

`@-webkit-keyframes {
  from {
    -webkit-transform:rotate(1deg);
    transform:rotate(1deg);
  }
  ...
}`

Because it is very unlikely that Firefox, IE, or anything else will read 
@-webkit-keyframes and it is very unlikely that a Webkit browser will read 
anything other -webkit-transform and transform. So we can save some space by 
not sending values the browser will never read.

The current behaviour does not duplicate the original, and it only does -webkit.

Original comment by audvare on 5 Dec 2011 at 11:29