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/11/24 10:46:24 UTC

[GitHub] [royale-asjs] Melliti opened a new issue #951: migrate flex css to real css

Melliti opened a new issue #951:
URL: https://github.com/apache/royale-asjs/issues/951


   Hi,
   
   I have a minor issue in my migration with CSS. My css is "Flex style" CSS in camelCase and doesn't provide units (px, em, ...) for properties. For example:
   
   ```
   .container {
   	cornerRadius:10;
   	borderColor: #777777;
   	fontFamily: Verdana;
   	fontSize: 12;
   	backgroundColor: #efefef;
   }
   ```
   
   Now, it should be
   
   
   ```
   .container {
   	border-radius :10px;
   	border: solid 1px #777777;
   	font-family: Verdana;
   	font-size: 12px;
   	background-color: #efefef;
   }
   ```
   
   I created a program to convert camelCase into kebab case but i still have issue with values in px and some properties that doesn't exist like ```cornerRadius``` which would become ```corner-radius``` with my program.
   
   Does MXMLC have a flag to convert flex CSS in a real CSS readable by the browser ? I must achieve the migration without modifying too much the code base. 


----------------------------------------------------------------
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



[GitHub] [royale-asjs] carlosrovira commented on issue #951: migrate flex css to real css

Posted by GitBox <gi...@apache.org>.
carlosrovira commented on issue #951:
URL: https://github.com/apache/royale-asjs/issues/951#issuecomment-745190508


   I use just standard CSS, but I think we have automatic conversion from Flex, or at least I think I saw it in code.
   I mean, if you have "bordeColor" and exists as "border-color" in standard CSS, that should work out of the box. Instead, a only-flex property will not work, and you need to recode. Maybe I'm wrong on this and others can give more knowledge...


----------------------------------------------------------------
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



[GitHub] [royale-asjs] Melliti commented on issue #951: migrate flex css to real css

Posted by GitBox <gi...@apache.org>.
Melliti commented on issue #951:
URL: https://github.com/apache/royale-asjs/issues/951#issuecomment-745207172


   I tried again after reading your comments.
   I commented all my CSS except a bloc of properties. You are right, it compiles and yes the camelCase is automatically turned into kebab-case for the browser.
   
   I identified my problem, it was with some properties which use Images and make fail the compilation
   For example 
   ```skin: Embed(source="PATH/TO/RESOURCE")```
   it triggers 
   
   > Warning: Definition mx.core.BitmapAsset could not be found.
   > Error: The definition of base class BitmapAsset was not found.
   
   We had to change this line of CSS by 
   ```background-image: url("PATH/TO/RESOURCE")```
   
   I guess, as you said @carlosrovira I must recode properties that doesnt exist in strandard CSS.
   
   
   Thx @carlosrovira and @Harbs, i'll continue to dig and i'll close this thread if it's ok


----------------------------------------------------------------
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



[GitHub] [royale-asjs] Harbs commented on issue #951: migrate flex css to real css

Posted by GitBox <gi...@apache.org>.
Harbs commented on issue #951:
URL: https://github.com/apache/royale-asjs/issues/951#issuecomment-745178203


   I don't think anyone created a solution, although a lot of modern IDEs can flag invalid (HTML) CSS.


----------------------------------------------------------------
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



[GitHub] [royale-asjs] Melliti commented on issue #951: migrate flex css to real css

Posted by GitBox <gi...@apache.org>.
Melliti commented on issue #951:
URL: https://github.com/apache/royale-asjs/issues/951#issuecomment-745166555


   Nobody has a solution ?


----------------------------------------------------------------
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