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

[CSS] Add ability to resolve the URL given with an @import statement relative to the FX runtime

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P3 P3
    • 8u40
    • 8u40
    • javafx

      Leveraging RT-35260 "[CSS] Changing user_agent stylesheet on scene or subscene" implies to provide a single CSS file to setUserAgentStylesheet because it takes a URL, not a list of them.
      In the case of SceneBuilder we need to aggregate several CSS files which are part of the FX runtime jar.
      As an example the SB file "modena-touch-highContrast-blackOnWhite.css" would have as content:

      @import “com/sun/javafx/scene/control/skin/modena/modena.css";
      @import “com/sun/javafx/scene/control/skin/modena/touch.css";
      @import “com/sun/javafx/scene/control/skin/modena/blackOnWhite.css”;

      The problem is that these 3 FX runtime CSS files would be resolved from the SB CSS file: this has no chance to work unless they are copied into the SB JAR, which doesn't seem to be a good option.

      The required tweak is a mechanism to resolve the URL given with an @import statement relative to the FX runtime JAR when the URL denotes an FX runtime CSS file.

            dgrieve David Grieve
            yjoan Yves Joan (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: