2 Replies Latest reply on Aug 30, 2007 5:54 PM by Ansury

    Class-scope CSS properties

    Ansury Level 3
      I've found that if I do something like this in a CSS file, it doesn't seem to work for Label objects:

      Label {
      color: #FF2222;

      If I do something similar for other classes, like Alert, or Button, MenuItem, etc. etc., the changes take effect for all instances of the class, as it should. What's up with Label?

      Could I be mistakenly doing something that isn't so obvious, that is overriding the CSS style? Or is this a Flex bug?
        • 1. Re: Class-scope CSS properties
          Ansury Level 3
          Okay - by chance I found out the somewhat annoying answer: In the "design" view the label doesn't reflect the style, but when you run the application, it looks correct. (Of course, it takes some trial and error to get the text position right if the size happened to change...)

          I've noticed similar things for other components, too; the design view looking different from the actual view. I have a feeling there's a decent technical reason for this, but still, it negates the usefulness of the design view somewhat. Kinda sucks.
          • 2. Re: Class-scope CSS properties
            Ansury Level 3
            Turns out, for TextInput (if I do the same thing as demonstrated with Label above) - it doesn't work in either the design mode OR when actually running. The only way I can do something like change the font is if I set fontFamily specifically on each tag. Does anyone know why?