How would you write this to be SASS compliant?
.fader { display: inline-block; }
.fader img:last-child {
position: absolute;
top: 0;
Neither of the above worked for me, so.
last-of-type
only plays nice with elements, you can select things with classes all you like but this gets handled by the elements. So say you have the following tree:
To get to the last div with the class of middle
, doesn't work using last-of-type
.
My workaround was to simply change the type of element that somethingelse
was
Hope it helps someone out, took me a while to figure that out.