Hey guys, a custom code to change the Open Modal’s white border color when the background color is changed (paste teh code into the Open modal page Settings → Custom Code → Header area → Save → Publish).
P.S. you will need to change #FAFAFC to your needed color hex.
<script>
document.addEventListener("DOMContentLoaded", (event) => {
document.getElementsByClassName('sw-modal-container')[0].style.backgroundColor = '#FAFAFC';
});
</script>
1 Like
Hi Marine,
I posted this one too, for the border of the modal, just in case!
Now that all buttons support “open modal”, it’s time to customize it a little
In your custom code header, on the page where the button leading to a modal is, insert this:
<style>
.sw-modal-container.sw-modal-size-md {
border-radius: 10px;
border: 2px solid #0000FF;
}
</style>
You will be able to customize the border thickness, the border color and the corner radius.
I don’t think there should be more to customize but feel free if you want me to add something
Also note that a cod…
Hey @matthieu_chateau , that is awesome, thanks for highlighting it!
Custom code snippets can never be too many, can they? Though your code gives a broader amount of options to customize
1 Like