mos Posted March 9, 2021 Share Posted March 9, 2021 Hi, I have the following CSS in a ServerModule.CustomCSS: .selectedpanel { border-color: red; border-width: 5px; } This is used to put a border around a panel when the user clicks it: procedure TMainForm.UniPanel1Click(Sender: TObject); begin UniPanel1.JSInterface.JSCode('var me='#1'; me.addBodyCls("selectedpanel");'); end; This code works if the theme is Classic or Gray but does not work for others such as Neptune. How can I get this work for all themes. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted March 9, 2021 Share Posted March 9, 2021 26 minutes ago, mos said: This code works if the theme is Classic or Gray but does not work for others such as Neptune. Hello, Some themes can overlap your CSS using additional CSS rules. Quote Link to comment Share on other sites More sharing options...
mos Posted March 9, 2021 Author Share Posted March 9, 2021 Hi Sherzod, I just added the !important to the css and it now works with Neptune. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted March 9, 2021 Share Posted March 9, 2021 Just now, mos said: I just added the !important Yes, this is not always recommended, but in some cases, there is no other option... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.