You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@royale.apache.org by GitBox <gi...@apache.org> on 2020/01/01 11:38:03 UTC

[GitHub] [royale-asjs] pashminakazi opened a new issue #644: How to use nth-child in Css file

pashminakazi opened a new issue #644: How to use nth-child in Css file
URL: https://github.com/apache/royale-asjs/issues/644
 
 
   i am unable to use 
   #DocumentDetail > div > div > div > div:nth-child(2) > div 
   in my default.css nth-child is not allowed.
   Is there any alternate of nth-child(2)?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [royale-asjs] carlosrovira commented on issue #644: How to use nth-child in Css file

Posted by GitBox <gi...@apache.org>.
carlosrovira commented on issue #644: How to use nth-child in Css file
URL: https://github.com/apache/royale-asjs/issues/644#issuecomment-570173046
 
 
   Hi Alex, I think this is not a problem for emulation components (I mean don't think that should be use as a way to solve something in some MX Comp). I think this is a problem of Royale it self, crossing any solution. People look on how to solve things vía CSS and solutions on internet uses this selector and others. We have partial support for selectors at this time. So this is a problem for end user doing CSS things at Application level. Pashmina or myself suffer this working with Royale at App level (I as well at framework level working with Jewel).
   
   A part from philosophical motivations about our CSS bugs and why we should prioritize or not I tried to solve it myself. I'm interested in fix this kind of bugs.
   
   I tried a couple of things that didn't worked.
   
   I tried to add to CSS.g and CSSTree.g:
   
   - CSS.g
     -  Added to /* Lexer Rules */ this one: NTH_CHILD : 'nth-child' ;
     -  Added to singleValue :  |   NTH_CHILD ARGUMENTS		    -> ^(NTH_CHILD ARGUMENTS)
   - CSSTree.g
     - In singleValue returns [CSSPropertyValue propertyValue], added:   |   ^(NTH_CHILD l=ARGUMENTS)
           { $propertyValue = new CSSFunctionCallPropertyValue($NTH_CHILD.text, $l.text, $start, tokenStream); }
   
   Other option I tried was to add:
   - CSS.g
     -  Added to FUNCTIONS:       | 'nth-child'
   - In JSCSSCompilationSession.java:
     -  Added to `otherCSSFunctions`:   "nth-child"
   
   any of this options results in another error, that seems better one, but still mostly impossible to debug for me.
   
   A side from solving 2N, I think as well we need to add in some place values like EVEN, ODD
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [royale-asjs] pashminakazi commented on issue #644: How to use nth-child in Css file

Posted by GitBox <gi...@apache.org>.
pashminakazi commented on issue #644: How to use nth-child in Css file
URL: https://github.com/apache/royale-asjs/issues/644#issuecomment-570121136
 
 
   @carlosrovira Thanks

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [royale-asjs] carlosrovira commented on issue #644: How to use nth-child in Css file

Posted by GitBox <gi...@apache.org>.
carlosrovira commented on issue #644: How to use nth-child in Css file
URL: https://github.com/apache/royale-asjs/issues/644#issuecomment-570075364
 
 
   Hi Pashmina nth-child is one of the CSS selectors that are not working now. Hope Alex can solve this bug since he knows more about how that work. In general, we should support nth-child(2n), nth-child(even), nth-child(odd). I think that's the main functions although more cases could be needed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [royale-asjs] pashminakazi closed issue #644: How to use nth-child in Css file

Posted by GitBox <gi...@apache.org>.
pashminakazi closed issue #644: How to use nth-child in Css file
URL: https://github.com/apache/royale-asjs/issues/644
 
 
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [royale-asjs] aharui commented on issue #644: How to use nth-child in Css file

Posted by GitBox <gi...@apache.org>.
aharui commented on issue #644: How to use nth-child in Css file
URL: https://github.com/apache/royale-asjs/issues/644#issuecomment-570126669
 
 
   The emulation components shouldn't need to support fancy CSS like nth-child since Flex didn't support it so it isn't a priority in my list currently.  Folks who want to can look at past commits that allowed other fancy CSS and upgrade support in the compiler.
   
   From the emulation components perspective, the question is what the higher-level goal is.  In Flex, subclasses or styleNames/classNames are added to specific children and then styled using less-fancy CSS.
   
   Or, IOW, what was working in Flex that isn't working in Royale?  Highlighting some selected item?  Whatever it is, it probably means that the way Flex supported custom visuals needs to be emulated in Royale.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services