Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8088626

Different case sensitivity in css vs. bss

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P5 P5
    • tbd
    • 8u40
    • javafx

      I am not sure whether CSS in JavaFX is supposed to be case sensitive or insensitive. The JavaFX CSS Reference Guide says: Boolean values can either have the string value of "true" or "false", the values are case insensitive as all CSS is case insensitive. The book Learn JavaFX 8 says: The Style class names in JavaFX are case sensitive.

      However, using the following CSS:

          .root {
              -sidebar-R: #FF0000;
              -sidebar-L: #00FF00;
          }

      and Java code:

          group.setStyle("-sidebar: -sidebar-R;");

      work fine together, unless the undelying css file is compiled to a bss file. I observed that in the bss file, all CSS names are converted to lowercase. Within the compiled bss file, -sidebar-R can not be resolved any more!

      Of course, the workaround and best practise is to not use uppercase letters in CSS at all - but the different behavior between css and bss is confusing.

            Unassigned Unassigned
            jehrkejfx Jens Ehrke (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Imported: