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

Media query should accept multiple rules

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P3 P3
    • tbd
    • jfx25
    • javafx
    • None

      This was seen on StackOverflow:
      https://stackoverflow.com/questions/79768663/is-possible-write-multiple-nodes-in-new-media-query-in-css-in-javafx-25


      Given the following stylesheet:

      .label {
          -fx-text-fill: black;
      }

      .border-pane {
          -fx-background-color: white;
      }

      @media (prefers-color-scheme: dark) {
          .border-pane {
              -fx-background-color: black;
          }
          .label {
              -fx-text-fill: white;
          }
      }


      The following CSS parser error is encountered:

      D:\JDKs\JDK_samples>runDemo.bat
      Sep 19, 2025 9:26:46 AM javafx.css.CssParser consumeRBrace
      WARNING: CSS Error parsing file:/D:/JDKs/JDK_samples/test.css: Expected RBRACE at [13,1]

            mstrauss Michael Strauß
            mstrauss Michael Strauß
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: