source/index.js
function expand_modifier_style_classes(node)
{
	const style = get_node_style(node)
	const pseudo_classes_and_media_queries_and_keyframes = get_node_pseudo_classes_and_media_queries_and_keyframes(node)

	const modifiers = Object.keys(node)
		// get all modifier style class nodes
		.filter(name => typeof(node[name]) === 'object' && node[name]._is_a_modifier)
	
	// for each modifier style class node
	modifiers.forEach(function(name)
	{
		// // delete the modifier flags
		// delete node[name]._is_a_modifier

		// include parent node's styles and pseudo-classes into the modifier style class node
		node[name] = extend({}, style, pseudo_classes_and_media_queries_and_keyframes, node[name])

		// expand descendant style class nodes of this modifier
		expand_modified_subtree(node, node[name])
	})
	
	// for each modifier style class node
	modifiers.forEach(function(name)
	{
		// delete the modifier flags
		delete node[name]._is_a_modifier
	})

	// recurse
	Object.keys(node)
		// get all style class nodes
		.filter(name => typeof(node[name]) === 'object')
		// for each style class node
		.forEach(function(name)
		{
			// recurse
			expand_modifier_style_classes(node[name])
		})

	return node
}
function expand_modifier_style_classes(node)
{
	const style = get_node_style(node)
	const pseudo_classes_and_media_queries_and_keyframes = get_node_pseudo_classes_and_media_queries_and_keyframes(node)

	const modifiers = Object.keys(node)
		// get all modifier style class nodes
		.filter(name => typeof(node[name]) === 'object' && node[name]._is_a_modifier)
	
	// for each modifier style class node
	modifiers.forEach(function(name)
	{
		// // delete the modifier flags
		// delete node[name]._is_a_modifier

		// include parent node's styles and pseudo-classes into the modifier style class node
		node[name] = extend({}, style, pseudo_classes_and_media_queries_and_keyframes, node[name])

		// expand descendant style class nodes of this modifier
		expand_modified_subtree(node, node[name])
	})
	
	// for each modifier style class node
	modifiers.forEach(function(name)
	{
		// delete the modifier flags
		delete node[name]._is_a_modifier
	})

	// recurse
	Object.keys(node)
		// get all style class nodes
		.filter(name => typeof(node[name]) === 'object')
		// for each style class node
		.forEach(function(name)
		{
			// recurse
			expand_modifier_style_classes(node[name])
		})

	return node
}
function expand_modifier_style_classes ( node ) { const style = get_node_style ( node ) const pseudo_classes_and_media_queries_and_keyframes = get_node_pseudo_classes_and_media_queries_and_keyframes ( node ) const modifiers = Object . keys ( node ) // get all modifier style class nodes . filter ( name => typeof ( node [ name ] ) === 'object' && node [ name ] . _is_a_modifier ) // for each modifier style class node modifiers . forEach ( function ( name ) { // // delete the modifier flags // delete node[name]._is_a_modifier // include parent node's styles and pseudo-classes into the modifier style class node node [ name ] = extend ( { } , style , pseudo_classes_and_media_queries_and_keyframes , node [ name ] ) // expand descendant style class nodes of this modifier expand_modified_subtree ( node , node [ name ] ) } ) // for each modifier style class node modifiers . forEach ( function ( name ) { // delete the modifier flags delete node [ name ] . _is_a_modifier } ) // recurse Object . keys ( node ) // get all style class nodes . filter ( name => typeof ( node [ name ] ) === 'object' ) // for each style class node . forEach ( function ( name ) { // recurse expand_modifier_style_classes ( node [ name ] ) } ) return node }
expand modifier style classes
expand modifier style classes