<?xml version="1.0" encoding="UTF-8"?>
<formatter id="com.macrabbit.formatting.CSS" language-context="css">
	
	<template><![CDATA[
	#example-style{display:block;float:left;clear:both;}
	#another-style,#third-style{width:20px;height:10px;}
	]]></template>
	
	<rules>
		
		<!-- style {|...|} -->
		<inside item="built-in.css.style">
			<indentation spacing="\t" />
		</inside>
		
		<!-- style {} >|< style {} -->
		<before zone="selector.css, group-start" previous-zone="block.css:not(group-start)">
			<insert spacing="\n\n" />
		</before>
		
		
		
		<!-- selector, >|< other-selector { -->
		<after zone="selector > punctuation.comma">
			<insert spacing=" " />
		</after>
		
		<!-- selector >|< { -->
		<before zone="block.css:not(comment)">
			<insert spacing=" " />
		</before>
		
		<!-- selector { >|< property: value; } -->
		<after zone="block.css:not(comment) > punctuation.begin">
			<insert spacing="\n" />
		</after>
		
		<!-- selector { property: value; >|< } -->
		<before zone="block.css:not(comment) > punctuation.end">
			<indentation id="css.pre-close-bracket" />
			<insert spacing="\n" />
		</before>
		
		<!-- property >|< : value; -->
		<before zone="property-value > punctuation.separator">
			<insert spacing="" />
		</before>
		
		<!-- property: >|< value; -->
		<after zone="property-value > punctuation.separator">
			<insert spacing=" " />
		</after>
		
		<!-- property: value >|< ; -->
		<before zone="property-value > punctuation.terminator">
			<insert spacing="" />
		</before>
		
		<!-- ... >|< property: value; -->
		<before zone="property-name" previous-zone="*:not(punctuation.begin)">
			<insert spacing="\n" />
		</before>
		
		
		
		<!-- Group formatting (currently hard-coded) -->
		
		<after zone="group-start">
			<insert spacing="\n\n" />
		</after>
		
		<before zone="group-end">
			<insert spacing="\n\n" />
		</before>
		
		<inside item="built-in.css.style">
			<indentation spacing="\t\t" />
		</inside>
		
	</rules>
</formatter>
