I just noticed that Webkit now has some support regarding CSS Values and Units Module Level . And I was wondering if anyone knows if there is a way to reference another CSS selectors property (or DOM type) from the CSS selector?
I expect something like this to be the answer here. What I know most likely relates to current browser implementations; but please continue reading ...
For example, in the case when the animation can resize the element ( NOTE ${.element2.width} is a dummy syntax):
<style type="text/css"> .element1 { .width: calc(80% - ${.element2.width}); } .element2 { .width: 100px; } .element2:hover { width: 200px; transition: all 0.4s ease-in-out; } </style>
In this case, I would expect the width of .element1 to be reevaluated based on the transition caused by hover events on .element2.
I understand the above specification. this is only a working draft, but perhaps the syntax for referencing such a “link selector property” is defined in another spec. which I have not yet discovered? Or just not a case for concern (thanks for missing work)?
Thank you in advance for the time spent reading, not to mention answering the question.
Benjamin conlan
source share