A global attribute such as class is added to elements via the GlobalAttribute\ClassTrait. It's setter allows strings and arrays.
Now, if I merge in a new framework specification which deifnes class differently, the pre-made ClassTrait won't know about it.
For example, in PicoCSS the class of an HTML element can be string, array OR a ClassEnum.
enum ClassEnum: string
{
case SECONDARY = 'secondary';
case CONTRAST = 'contrast';
case OUTLINE = 'outline';
case SECONDARY_OUTLINE = 'secondary outline';
case CONTRAST_OUTLINE = 'contrast outline';
}
Figure out, what to do here. Options are:
- (re)generating or updating the Trait, or
- adding (custom) getter and setter overrides to the element class - which has more implications.
- evaluate if this is a problem - it's possible that everything works just fine - as long as the class attribute is defined in YAML in elements. maybe it's necessary to only remove the gloabl trait if the attribute is present in the YAML.
A global attribute such as class is added to elements via the GlobalAttribute\ClassTrait. It's setter allows strings and arrays.
Now, if I merge in a new framework specification which deifnes class differently, the pre-made ClassTrait won't know about it.
For example, in PicoCSS the class of an HTML element can be string, array OR a ClassEnum.
Figure out, what to do here. Options are: