Using CSS media queries and CSS variables in JavaScript
Issue:
You want JavaScript to execute something based on a breakpoint in a CSS media query.
Solution:
Read the breakpoint value directly from the --Breakpoint CSS variable, create a matchMedia query from it, and use an event listener to run JavaScript whenever the viewport crosses that breakpoint.