This discussion is archived
2 Replies Latest reply: Nov 18, 2012 11:27 PM by Tobi RSS

support for CSS3 attribute "content"?

Tobi Newbie
Currently Being Moderated
Does JavaFX supports the CSS 3 attribute "content"?
  • 1. Re: support for CSS3 attribute "content"?
    jsmith Guru
    Currently Being Moderated
    I think not. I don't think it would make any sense in the context of JavaFX. It makes modifications to html elements which don't exist in JavaFX.
    I guess it would work in the context of a css file referenced by an html file loaded by webview, but that is not your intended use is it?

    If you could specify a content attribute, what would you have it do?
    Can you provide an example of a JavaFX program+css file in which you make use of the content attribute?

    Here is a reference to the content attribute for those interested: http://www.htmldog.com/reference/cssproperties/content/
  • 2. Re: support for CSS3 attribute "content"?
    Tobi Newbie
    Currently Being Moderated
    In HTML you can use "content" and ":before" and ":after" to place further HTML nodes. It's very useful. In JavaFX we could place new Node objects.

    What I'm trying to do is to port the "iOS toogle field with CSS" example to JavaFX: http://css3wizardry.com/2011/12/18/ios-5-style-switch-control/

    There I would like to show a text ("ON", "OFF") in the background of a CheckBox node.

    I would like to use only CSS for skinning...

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points