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

Error generated when referencing a constant color defined in CSS root from an inline style on a node contained within a CustomMenuItem

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: P4 P4
    • 8
    • fx2.0
    • javafx
    • XP, b42

      I think there's a good chance this is related to RT-16215, but since it doesn't require applying custom CSS classes to trigger this error I thought it best to file separately.

      If you create a CustomMenuItem whose node references a constant color defined in your CSS .root class via its inline style (set through setStyle()), an error is thrown because it can't resolve the color definition. In my attached sample app, you'll see that I can successfully reference the color/paint definition "-pal-SystemBlue" defined in test.css on my top-level SplitMenuButton, but the HBox that is contained within a CustomMenuItem cannot reference it without causing errors.

        1. Main.java
          2 kB
          Kyle McIntyre
        2. test.css
          0.0 kB
          Kyle McIntyre

            dgrieve David Grieve
            kmcintyrejfx Kyle McIntyre (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: