Project

General

Profile

Support #5865

Adding and Removing Rules with WCssStyleSheet

Added by Heiko Gerdau about 5 years ago. Updated almost 5 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
08/08/2017
Due date:
% Done:

0%

Estimated time:

Description

Hi,

I'm trying to use the internal stylesheet to dynamically update the appearence of a template (divs that are not mapped to Wt widgets). I'm probably missing something as you can see from the following questions:

When adding a rule to the internal stylesheet one might supply a name which may be used to detect (WCssStyleSheet::isdefined()) wether it is already set.

But after removing that rule WCssStyleSheet::isdefined() still returns true. Is that a bug?

How can I change a rule? There is a function WCssRule::modified() but I found no way to achieve the modification.

To remove a rule I have to keep track of the pointers returned from "WCssStyleSheet::addRule". I would have expected a getter like "getRuleByName" and a way to change the declarations of a rule.

What do I miss?

The widgets I want to style in this way are divs of complex flex layouts which - as far as I know - can not be mapped to Wt-widgets if I do not use Wt-layouts to manage their content. That's why I do not use external stylesheets and addStyleClass in this case.

Thanks for any advice?

Regards,

Heiko

Also available in: Atom PDF