I noticed two bugs regarding InputfieldRepeater and have one more request:
- if the color is specified first in the
repeaterTitle configuration field, the \t in $colorPrefix is removed because of a call to trim()
- the custom color is not applied to the border (but it is when opened). You could edit this line InputfieldRepeater.module#L517 to add
--pw-border-color: #$matches[1];
- not sure if this is an issue but shouldn't this regex match this one?
Lastly regarding my request: I would like to be able to set different colors based on some conditions within the InputfieldRepeater::renderRepeaterLabel hook. However the way the color is applied in CSS (based on the data-typeName) makes it so only the last repeater’s color is applied (because data-typeName is empty for a regular repeater). One potential fix could be to make InputfieldRepeater::getRepeaterItemTypeName hookable?