ethereal,
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" lang="ru">
<meta name="viewport" content="width=device-width, initial-scale=1.0" >
<style id=stv>
#el{
width: 100px;
height: 50vh;
}
.cl {
width: 300px;
height: 100em;
color: rgb(255,220,220);
--var1: 100px;
transform: translate3d(-490px, 0px, 0px);
}
</style>
</head>
<body>
<script>
let getStyle = (st, sel, name) => {
const rules = st.sheet.cssRules
for (let i=0; i<rules.length; i++) {
if (sel == rules[i].selectorText) {
return rules[i].style.getPropertyValue(name)
}
}
}
let st = document.getElementById('stv')
let [tx, ty, tz] = getStyle(st, '.cl', 'transform').match(/-*\d+(?=px)/g);
console.log(tx, ty, tz);
alert(tx);
</script>
</body>
</html>