March 2026

Get the Value of a CSS Custom Property Variable on a Page

const checkValue = getComputedStyle(document.documentElement)
  .getPropertyValue("--test_$_TEST_ID_").trim();
end of line