Maybe we could have compiler option: strip-out-invalid-css. The compiler would 
know to read some class in royale-asjs that lists these invalid values and 
filters them out of the compiled css. I don’t think we should require uses to 
annotate invalid css attributes; besides inflicting overhead on our users it 
would make the css less legible. It’s enough that we document these atts 
somewhere.



________________________________
From: Harbs <harbs.li...@gmail.com>
Sent: Thursday, November 30, 2017 1:15:44 PM
To: dev@royale.apache.org
Subject: Outputting valid/efficient CSS

I just ran some CSS output by Royale through a CSS validator.[1] It turned up 
some issues, but most were results of my migration from Flex.

The one exception I found was:
* {
        effect-timer-interval: 10;
    }
effect-timer-interval is not a valid CSS property. It comes from the defaults 
css in Basic and it’s used by EffectsTimer which gets the value from the 
ValuesManager.

Having an invalid css declaration is not the end of the world, but it would be 
nice to be able to clean up the CSS to remove CSS not used by the browser.

I’m trying to brainstorm on ways of accomplishing that goal.

Maybe we could support prefixing selectors or attributes to mark them as 
“Royale only” so they would be stripped out of the CSS output? Some other ideas?

Thoughts?
Harbs

[1]https://csstree.github.io/docs/validator.html 
<https://csstree.github.io/docs/validator.html>

Reply via email to