Given a .tsx
defines a component A()
– that has an element <H>
, which height
property may change. There is a different .tsx
having a component B()
that includes CSS x.css
and this component B()
intends to position an element <E>
right below the element <H>
.
I intend to employ sticky
positions for <E>
in x.css
and calculate the current height of the <H>
element something like this:
.e-style {
position: sticky;
top: calc(var(--ElementH-height));
}
I would need this to make <E>
sticky against scrolling.
Can I set this variable in A()
‘s CSS file and if so, will it keep updating ?