Open Modal: white border color change

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!

Hey @matthieu_chateau, that is awesome, thanks for highlighting it!

Custom code snippets can never be too many, can they? :wink: Though your code gives a broader amount of options to customize :raised_hands:

1 Like

And CSS.
javascript-javascript-everywhere