Set attribute in CSS pseudo-elements ::before and ::after

hi, how I can change CSS for a pseudo element style?

example:
CSS
PHP:
.iziToast-wrapper-bottomLeft .iziToast.iziToast-balloon:before {
  border-right: 15px solid transparent;
  border-left: 0 solid transparent;
  right: auto;
  left: 8px; // this its the attribut i need target in js
}

JS
PHP:
    if(description_iziToast){
        let RightMode = event.x>window.innerWidth/2;
        let bubblePosition = document.getElementsByClassName("iziToast-balloon")[0]; // get the div that hold the bubble
        let ajustScreenLR = RightMode && document.getElementsByClassName("iziToast")[0].offsetWidth || 0; // halfScreen ajustement
        //bubblePosition.style.left = RightMode && '95%' || '4px'; // here i need to change the position in the befor:: attribut
        description_iziToast.style.left = `${event.x-20-ajustScreenLR}px`;
        description_iziToast.style.top = `${event.y-105}px`;
    }
    }else{
        if(description_iziToast){ iziToast.destroy(); description_iziToast = false; };
    }


So am trying to get the CSS befor:: rule and change left: to '95%' or '4px'. Ho i can perform this in my context ?

I also make some test with document.querySelector but not work, i get a compute Read-Only error.

Do you have suggest?
Moderator note: Closed at the request of the OP. If you want this thread reopened, please Report this post, giving the reason why.

Original thread: https://forums.rpgmakerweb.com/threads/set-attribute-in-css-pseudo-elements-before-and-after.92230/