After much consideration, and a few design revisions this is the solution for nesting I've come up with that seems to have the fewest "gotchas" (AKA: allows for supporting most any ). Previous attempts had smaller outputs, but caused many edge cases. I settled on retaining the original class names in the Markup, and embedding them in the atomized class to reduce styling outcomes that differ from source files.
After much consideration, and a few design revisions this is the solution for nesting I've come up with that seems to have the fewest "gotchas" (AKA: allows for supporting most any ). Previous attempts had smaller outputs, but caused many edge cases. I settled on retaining the original class names in the Markup, and embedding them in the atomized class to reduce styling outcomes that differ from source files.
Note: The class name encoding breakdown is:
rp__
__---CLASS_vehicle_
__---CLASS_
would be be replaced with__---TAG_
. Like.rp____---TAG_h1______-__---CLASS_car______-margin__--COLON4px
__---CLASS_
would be replaced. Like.rp____---ID_vehicle______-__---CLASS_car______-margin__--COLON4px
_____-
__---CLASS_car_
_____-
margin
__--COLON
4px
So the un-encoded atomic class name
.vehicle .car margin:4px
gets encoded torp____---CLASS_vehicle______-__---CLASS_car______-margin__--COLON4px
.classMap