On Friday, 30 December 2016 at 11:32:50 UTC, aberba wrote:
On Friday, 30 December 2016 at 06:22:40 UTC, bauss wrote:
[...]

Yeah. I meant a subset. But widgets will not follow the DOM query syntax, it should use class attributes.

.button {
  border-color: red;
}

.container {
  ...
}

auto btn = new Button();
btn.addClass("button");
btn.addStyleFromFile("style.css");

...
container = new ...
container.addStyleFromSource(".container {…}");

Yeah it kinda follows classes right now already.

It follows a little different concept, where it's based on selectors and not classes.

So you give your component selectors that it acts on. There are of course default selectors on them such as their component type, name, states etc.

See:
https://github.com/PoisonEngine/poison-ui/blob/master/src/ui/component.d#L297

And:
https://github.com/PoisonEngine/poison-ui/blob/master/src/ui/component.d#L376

Reply via email to