I don't know if i made a test case it will work because i made a new component based on unigui panel. I made a component and it works fine but when i try to add a CSS on the second panel "FPanelTopo" it doesn't work, just the first panel "Self" get the Style.
constructor panelBI.Create(AOwner : TComponent);
var
borderStyle: TUniBorderStyle;
aligControl: TUniAlignmentControl;
cColor: TColor;
begin
inherited Create(AOwner);
borderStyle:= ubsNone;
aligControl:= uniAlignmentClient;
cColor:= clWhite;
self.Color:= cColor;
self.Layout:= 'vBox';
self.Height:= 200;
self.Width:= 400;
self.BorderStyle:= borderStyle;
self.LayoutConfig.Margin:= '5 0 5 0';
self.LayoutConfig.flex:= 1;
self.LayoutConfig.Width:= '100%';
self.LayoutConfig.Height:= '100%';
self.ClientEvents.UniEvents.Add('beforeInit=function beforeInit(sender, config){sender.cls="gray_borders";}');
FPanelTopo := TUniPanel.Create(Self);
FPanelTopo.Parent:= Self;
FPanelTopo.Layout:= 'hBox';
FPanelTopo.LayoutConfig.Width:= '100%';
FPanelTopo.LayoutAttribs.Align:= 'middle';
FPanelTopo.Color:= $00F5F5F5;
FPanelTopo.Height:=30;
FPanelTopo.Width:=400;
FPanelTopo.BorderStyle:= borderStyle;
FPanelTopo.AlignmentControl:= aligControl;
FPanelTopo.Top:=2;
FPanelTopo.LayoutConfig.Margin:= '0 0 5 0';
FPanelTopo.ClientEvents.UniEvents.Add('beforeInit=function beforeInit(sender, config){sender.cls="gray_borders";}');
end;