2 Replies Latest reply on Mar 5, 2009 9:55 AM by Phrankie

    CSS issues

    Hulfy
      Hi I have just started my first flex app and have 2 question

      (i) are there any code hint for css? When I start to type 'bac' I expected the options to appear as a dropdown. This does happen when doing inline styles in the mxml file

      (ii) Can VBoxes nad buttons have id's I have created a vbox like this

      <mx:VBox id="clientBox" width="200" height="200" />

      and in my css

      VBox#clientBox {
      backgroundColor:red;
      bottom:0;
      }

      when I try to use ids I get the error
      CSS selector condition type is not supported: '#clientBox'
        • 1. Re: CSS issues
          Level 7

          "Hulfy" <webforumsuser@macromedia.com> wrote in message
          news:git740$sqi$1@forums.macromedia.com...
          > Hi I have just started my first flex app and have 2 question
          >
          > (i) are there any code hint for css? When I start to type 'bac' I expected
          > the
          > options to appear as a dropdown. This does happen when doing inline styles
          > in
          > the mxml file

          I've never seen any

          > (ii) Can VBoxes nad buttons have id's I have created a vbox like this
          >
          > <mx:VBox id="clientBox" width="200" height="200" />
          >
          > and in my css
          >
          > VBox#clientBox {
          > backgroundColor:red;
          > bottom:0;
          > }

          No. It's not like "real" CSS.

          Instead, you need to use

          <mx:VBox id="clientBox" width="200" height="200" styleName="yourStyle" />


          • 2. CSS issues
            Phrankie
            There is a way to get CSS code hinting, but you have to use Flex's hyphen nomenclature. If you enter CSS with the normal camelCase approach, Flex will offer no auto-complete or hinting.

            For instance, if you type with camelCase:

                  fontS   

            then Flex offers no hinting.

            If you type

                  font- or   font-s

            then Flex will offer a code hinting list. However, not fully automatic on the Mac, I have to press control-space to call up the list.

            You can freely mix hyphenated and camelCase selector nomenclature in your CSS declarations. Flex doesn't care.

            If you create a stylesheet enter from a display object, Flex generates a hyphenated CSS selector. I don't think there's a way around that.

            Phrankie