I have a div type .cell.title
. It would be very helpful if I could change its grid-column
value, based on whether or not the next element is .cell.kicker
, or .cell.body
.
I could do this using js, but I'm curious to know if css has some kind of forward-looking way of affecting styling, along the lines of this purely imaginary notation:
.cell.title {
grid-column: auto;
}
.cell.title=>.cell.body {
grid-column: 1/-1;
}
I have my doubts this exists, but it's also hard to search for. Lots of things about siblings, but not conditional on what follows, as opposed to what precedes the tagged element.