Menu

#61 0.9.18 does not support @keyframes tag and looses formatting

0.9.25
accepted
RBRi
None
1
2017-10-31
2016-04-01
shivaraj
No

Please add support to @keyFrames. Using 0.9.18 jar, any @keyframes tags while parsing are being recognised as "CSSUnknownRuleImpl".

@keyframes background900
{
0% { background-position:0 0; }
100% { background-position:0 -900px; }
}

In the above example, if i iterate this rule it removes the "%" sign and it breaks the entire animation. 
The output looks like this
@keyframes background900
{
    0  { background-position:0 0; }
    100 { background-position:0 -900px; }
}

Related

Bugs: #61

Discussion

1 2 > >> (Page 1 of 2)
  • shivaraj

    shivaraj - 2016-04-01
    • assigned_to: RBRi
     
  • shivaraj

    shivaraj - 2016-04-02
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -6,10 +6,11 @@
             **100%** { background-position:0 -900px; }
         }
    
    -    In the above example, if i iterate this rule it looses the % for 0. The output of this rule by this parser is
    +    In the above example, if i iterate this rule it removes. 
    +    The output looks like this
         @keyframes background900
         {
             **0**  { background-position:0 0; }
    -        **100 ** { background-position:0 -900px; }
    +        **100** { background-position:0 -900px; }
         }
    
     
  • shivaraj

    shivaraj - 2016-04-02
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -10,7 +10,7 @@
         The output looks like this
         @keyframes background900
         {
    -        **0**  { background-position:0 0; }
    -        **100** { background-position:0 -900px; }
    +        0  { background-position:0 0; }
    +        100 { background-position:0 -900px; }
         }
    
     
  • shivaraj

    shivaraj - 2016-04-02
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -6,7 +6,7 @@
             **100%** { background-position:0 -900px; }
         }
    
    -    In the above example, if i iterate this rule it removes. 
    +    In the above example, if i iterate this rule it removes the "%" sign. 
         The output looks like this
         @keyframes background900
         {
    
     
  • shivaraj

    shivaraj - 2016-04-02
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -6,7 +6,7 @@
             **100%** { background-position:0 -900px; }
         }
    
    -    In the above example, if i iterate this rule it removes the "%" sign. 
    +    In the above example, if i iterate this rule it removes the "%" sign and it breaks the entire animation. 
         The output looks like this
         @keyframes background900
         {
    
     
  • Tim Dionne

    Tim Dionne - 2016-05-10

    Any chance this will get looked at soon? We are currently affected by this and need a fix or a workaound. Any ideas for working aroind this?

     
    • shivaraj

      shivaraj - 2016-05-10

      Hey Tim,

      For the keyframes case, I went ahead with a regex find and replace
      operation instead going through css parser.

      Thanks,
      Shivaraj

      On Mon, May 9, 2016 at 5:24 PM, Tim Dionne tdionne@users.sf.net wrote:

      Any chance this will get looked at soon? We are currently affected by this
      and need a fix or a workaound. Any ideas for working aroind this?


      Status: open
      Group: 0.9.18
      Created: Fri Apr 01, 2016 10:18 PM UTC by shivaraj
      Last Updated: Sat Apr 02, 2016 02:57 AM UTC
      Owner: RBRi

      Please add support to @keyFrames. Using 0.9.18 jar, any @keyframes tags
      while parsing are being recognised as "CSSUnknownRuleImpl".

      @keyframes background900
      {
      0% { background-position:0 0; }
      100% { background-position:0 -900px; }
      }

      In the above example, if i iterate this rule it removes the "%" sign and it breaks the entire animation. The output looks like this@keyframes background900{
      0 { background-position:0 0; }
      100 { background-position:0 -900px; }}


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/cssparser/bugs/61/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

       

      Related

      Bugs: #61

  • Anonymous

    Anonymous - 2016-05-10

    Thanks Shivaraj. Could you elaborate a bit? Are you saying that you completely bypass the parser and use regex directly on the CSS source? That sounds risky considering the different formats for CSS rules, including many different whitespace options, etc (I am consuming CSS files from customers, and the formatting is completely arbitrary). What I've done is extended SACParserCSS3 and overridden handleIgnoreableAtRule() to throw a CSSParseException. This allows me to fallback to the original source when this happens.

     
  • RBRi

    RBRi - 2016-05-14
    • status: open --> accepted
     
  • RBRi

    RBRi - 2016-05-14

    as a fist step i have fixed the missing units.

     
  • Tim Dionne

    Tim Dionne - 2016-05-16

    Thanks RBRi! So the 'px' suffixes are being preserved now? Do you think the percent signs will be more difficult? I appreciate you working on this!

     
    • RBRi

      RBRi - 2016-05-16

      Ok, 'units' was a bit misleading, the latest snapshot should preserve the whole string including percent signs.

       
  • Tim Dionne

    Tim Dionne - 2016-05-16

    Thanks!! I have verified that the latest snapshot build is working properly. Awseome. Any idea when 0.9.19 will be available?

    Thanks again.

     
  • RBRi

    RBRi - 2016-05-16

    I hope to get it done before end of may.
    Thanks for testing and your feedback.

     
  • Tim Dionne

    Tim Dionne - 2016-05-16

    Excellent! Thank you for the parser!

     
  • RBRi

    RBRi - 2016-05-23
    • Group: 0.9.18 --> 0.9.20
     
  • RBRi

    RBRi - 2016-07-23
    • Group: 0.9.20 --> 0.9.21
     
  • Anonymous

    Anonymous - 2016-08-02

    Hey RBRi, is this still not released? Or did you release part of it, preserving the % signs and units?

     
    • RBRi

      RBRi - 2016-08-03

      Or did you release part of it, preserving the % signs and units?
      Yep, that is in the release.

      The issue will be open until i find the time ot support the @keyframes rules in all its glory.

      rbri
      
       

      Last edit: RBRi 2018-01-21
  • Anonymous

    Anonymous - 2016-09-22

    Is @keyframes supported in css-parser-0.9.20 ? Is this considered as UnknownRule ?

     

    Last edit: Anonymous 2016-09-22
  • Adam Gabryś

    Adam Gabryś - 2016-11-05

    @keyframes are parsed correctly (you won't lost '%' character) but they are still recognized as CSSUnknownRuleImpl.

     
    • shivaraj

      shivaraj - 2016-11-06

      Hey Adam,

      This issue was fixed. Which is the jar version you using ?

       

      Last edit: RBRi 2018-01-21
      • Adam Gabryś

        Adam Gabryś - 2016-11-06

        Hi,
        I'm using 0.9.20 (latest released version).

        I made a small mistake, because my comment should be an answer to "Anonymous - 2016-09-22" question (instead of a standalone comment). I didn't verify 0.9.21-SNAPSHOT.

        Best Regards

         

        Last edit: Adam Gabryś 2017-01-08
  • RBRi

    RBRi - 2017-01-08
    • Group: 0.9.21 --> 0.9.22
     
  • RBRi

    RBRi - 2017-02-23
    • Group: 0.9.22 --> 0.9.23
     
1 2 > >> (Page 1 of 2)

Anonymous
Anonymous

Add attachments
Cancel





Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.