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

CSS styling engine doesn't style nodes inside of control skins

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Not an Issue
    • Affects Version/s: fx1.2.1
    • Fix Version/s: fx2.0
    • Component/s: javafx
    • Labels:

      Description

      The CSS engine does not style any nodes in the skin of a control. This means that a Button style will not be applied to Buttons that are in the skin of another control. At first this seems like a reasonable choice, but I now view this as a bug.

      The XPane control in JFXtras, for example, exposes a content node that gets added to the control's skin along with a background and title bar. This is container-like behavior, but it was implemented as a control for skinning and so that it wasn't necessary to resort to "contents" on-replace hacks to add the background and title bar nodes to the scene graph.

      Furthermore, the upcoming Flex 4 includes enhancements to its CSS styling support and it allows the styling of components within other components (i.e. a Button style will apply to the Button components in the MediaPlayer's skin). This is very convenient when styling an application because you need to write fewer selectors to get your styles applied to all components in the application. It's easier to call out the exceptions by creating explicit "MediaPlayer Button" selectors than it is to have to style each individual custom component.

        Attachments

          Activity

            People

            Assignee:
            dgrieve David Grieve
            Reporter:
            diversonjfx Dean Iverson (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported: