NodeTag

Tags are optional "marks" left on nodes that are used to apply matching styles. Tags closely resemble HTML classes.

Tags have to be explicitly defined before usage by creating an enum and marking it with the @NodeTag attribute. Such tags can then be applied by passing them to the constructor.

Examples

import fluid.label;

@NodeTag
enum Tags {
    myTag,
}

static assert(isNodeTag!(Tags.myTag));

auto myLabel = label(
    .tags!(Tags.myTag),
    "Hello, World!"
);

assert(myLabel.tags == .tags!(Tags.myTag));

Meta