CSS Style update partially

Description

Hi,

I've added a CSS Style on Business Partner window > Prospect field (is a checkbox) - see attached 2Pack :

InlineStyle = background-color: red!important; font-weight: bold;
DisplayLogic = @IsProspect@ = Y

When the window opens on a record IsProspect = Y, the label is displayed in red and bold (screenshot 1).
If I untick the checkbox, the label is displayed as 'normal' (screenshot 2).
But if I tick the checkbox again, the label is just displayed as bold (still in dark) (screenshot 3).
Opening the record from the Recent Items colorize the label with the right style.

Seems the style is loaded partially (only the "font-weight: bold" is used).

Is easily reproducible using attached 2Pack.

Thanks,

Nicolas

Environment

None

Activity

Show:
Matheus Marcelino
June 25, 2020, 4:38 AM

Triaged by Matheus Marcelino. The only difference i noticed, is that style seems to be randoml, sometimes display, sometimes not, even when the first record is according to the logic.

Carlos Ruiz
June 25, 2020, 5:21 PM

I just tested, dropped the !important part of the style and it worked fine.

Closing as invalid.

Regards,

Carlos Ruiz

Nicolas Micoud
June 26, 2020, 7:49 AM

Hi ,
Maybe we should add a validation in the code to prevent users from using the "!important" ?
And BTW, this is the example shown in the wiki (see first screenshot) : https://wiki.idempiere.org/en/NF4.1_Styles_On_Fields.

wdyt ?

Thanks,

Nicolas

Carlos Ruiz
June 26, 2020, 7:53 AM

Hi , a validation is not possible.

The style depends on the capabilities of each theme, some configurations require important, others don't.

Regards,

Carlos Ruiz

Assignee

Unassigned

Reporter

Nicolas Micoud

Labels

Tested By

None

Components

Affects versions

Priority

Major
Configure