let element = document.querySelector(".test");
let elementStyle = getComputedStyle(element, "::before")
console.log(elementStyle.backgroundColor);
document.styleSheets[0].cssRules
for (let i = 0; i < document.styleSheets[0].cssRules.length; i++) {
if (document.styleSheets[0].cssRules[i].selectorText === `.${class}::after`) {
let icon = document.styleSheets[0].cssRules[i];
break
}
}
icon.style.opacity = '1'