Flex Builder CSS annoyance

August 31, 2008

Maybe I’m missing something here, but why does FlexBuilder generate css styles as “styleName” but suggests auto completions as “style-name” ?

Generated Style

Generated Style
 

Auto-Complete

Auto-Complete
 


UPDATE: If you find this behaviour annoying, please vote on this Flash Builder bug
 


7 Responses - What do you think?

  1. No idea why…
    I noticed it also, weird.

  2. If I remember correctly, it used to generate ’style-name’ in the first version. The framework supports only ’styleName’; it is the compiler that translates ’style-name’ to ’styleName’. Somebody must have decided that it was better to be consistent with the framework and generate ’styleName’ instead.

    That still doesn’t answer the question: Why ’style-name’ at all? I guess readability. ’style-name’ is arguably more readable. Camel case sucks, in my not-so-humble opinion.

  3. More importantly, why does flex builder feel the need to hang for 15 seconds when i try to type more than 3 words??

  4. @Manish, if it does either one style, readability will be ok I think .. but generating ’styleName’ and suggesting auto completes as ’style-name’ is very annoying because I would like my css to look consistent and follow one style .. but if I generate some styles and type in others .. I have to manually change all auto completed styles from styleName to style-name. Yuk !

  5. @K, Flex Builder can be cranky sometimes, but its not that bad try this

  6. If you find this annoying, please vote on this Flash Builder bug
    https://bugs.adobe.com/jira/browse/FB-11166

  7. Jonathon Green
    August 28th, 2009

    The hyphenated naming convention is true CSS, where as Flex extensively uses lower camelCase. Therefore Flex compiles to lowerCamelCase, but because you’re using what is supposed to be a CSS Editor you are expected to use CSS standards, therefore the compiler compiles your web standards compatible style sheet into a mockery that Flex can understand.

    Basically, Flex has to bastardardise CSS and won’t produce compile errors if you do the job for it, but the CSS Editor will always correct you to use the proper syntax and naming conventions.

Your thoughts or questions: