3 ms·
is there a way for attr() (or similar) to access other css properties? In the example there is .child { position: absolute; left: 100px;
by _ZeD_ 14y ago
is there a way for attr() (or similar) to access other css properties?
In the example there is
.child {
position: absolute;
left: 100px;
width: calc(90% - 100px);
background-color: #ff8;
text-align: center;
}
whould be gorgeous to write instead
.child {
position: absolute;
left: 100px;
width: calc(90% - attr(left px));
background-color: #ff8;
text-align: center;
}
the mdn attr page[0] says it can also access properties, but I cannot find a way
[0] https://developer.mozilla.org/en-US/docs/CSS/attr https://developer.mozilla.org/en-US/docs/CSS/attr