Customize the border radius and the background color of the Add and Update modals

Hi all,

Here is the code to be inserted in the header code of the page settings.
Change #list2 by the right block ID (Works with all list blocks, list-details blocks and the table block).
If you don’t want to customize the border color and weight, just remove the line “border:” - IMO it can be better for a neat customization as you don’t need to add unecessary colors everywhere. But the code still gives this option.

<style>
#list2 .css-1empbk3 {
  background-color: #ebebeb;
  border-radius: 6px;
  border: 2px solid #ebebeb;
}
</style>

Note that you can add as many blocks as you wish in this css code.
For example. If you have 1 list block, 1 list-details block and 1 table block on the same page , and you want to customize the Add and update modals the code will look like this (please, be consistent in your design when you do it, otherwise your app will be… ugly as hell)

<style>
#list4 .css-1empbk3 {
  background-color: #ebebeb;
  border-radius: 6px;
  border: 2px solid #ebebeb;
}
#list-details1 .css-1empbk3 {
  background-color: #ebebeb;
  border-radius: 6px;
  border: 2px solid #ebebeb;
}
#table1 .css-1empbk3 {
  background-color: #ebebeb;
  border-radius: 6px;
  border: 2px solid #ebebeb;
}
</style>
1 Like

@matthieu_chateau I think you’re a magician :smile:
Thanks a lot for sharing the custom codes!

How to found the good css id ? The css of the modal or the list ? I tried different things but not working, thanks

EDIT : Solved with this post but I couldn’t find the CSS id despite everything

I’m pretty sure CSS IDs like .css-1empbk3 are randomized and change constantly and are risky to target for this reason.

Could be wrong, but I’m fairly certain this is the case.

You are almost right (well they can change along block types), so I try to not use the CSS Ids.

Except here where it didn’t change. The risk is they can change due to a sudden update.

So the right/preferred selector is in my other post pointed by Lea

1 Like