Finding the skewed offset of an element
I've a full width container, that has a
I'd like to place another element after it, so get the bounding rect coordinates and update a css-variable with the
Codepen: https://codepen.io/nwoodward/pen/JjBGbqW?editors=1111
Would appreciate any thoughts/approaches! Thanks
See the red progress bar, and the 'x' distance:
before pseudo element that's 3/5's the width absolutely positioned, and skewed by 12 degrees.I'd like to place another element after it, so get the bounding rect coordinates and update a css-variable with the
right value, which will be used as the left of the next element. I can't work out how to calculate/take into account how to adjust for the slant thoughCodepen: https://codepen.io/nwoodward/pen/JjBGbqW?editors=1111
Would appreciate any thoughts/approaches! Thanks
See the red progress bar, and the 'x' distance:

