Reloading stylesheets

Tom Schindl tom.schindl at bestsolution.at
Tue Dec 10 04:46:20 PST 2013


That doesn't work in 2.x because the CSS is cached on a scene base! A
trick that could work is to load the CSS with an URL like this like:

my.css?timestamp=123456789

but I have not tried that and don't know if this would work.

Tom

On 10.12.13 13:41, Scott Palmer wrote:
> Have you tried simply removing and re-adding the stylesheet to the scene?
> 
> Scott
> 
> 
> On Tue, Dec 10, 2013 at 7:21 AM, Werner Lehmann <
> lehmann at media-interactive.de> wrote:
> 
>> Hi,
>>
>> is there a way to reload previously loaded stylesheets (in FX2)?
>>
>> Currently I have to restart the application each time I am changing the
>> css. It would be nice to just close and reopen that window instead to see
>> the new styles. I'd like to unload css automatically when closing a window
>> - in debug mode - in order to avoid the application restart.
>>
>> Or, even better, define a hotkey to update css immediately. Much like
>> shift+ctrl+8 for ScenicView (only works in FX2 as far as I know).
>>
>> Rgds
>> Werner
>>



More information about the openjfx-dev mailing list