func (rule *Rule) Equal(other *Rule) bool {
	if (rule.Kind != other.Kind) ||
		(rule.Prelude != other.Prelude) ||
		(rule.Name != other.Name) {
		return false
	}
	if (len(rule.Selectors) != len(other.Selectors)) ||
		(len(rule.Declarations) != len(other.Declarations)) ||
		(len(rule.Rules) != len(other.Rules)) {
		return false
	}
	for i, sel := range rule.Selectors {
		if sel != other.Selectors[i] {
			return false
		}
	}
	for i, decl := range rule.Declarations {
		if !decl.Equal(other.Declarations[i]) {
			return false
		}
	}
	for i, rule := range rule.Rules {
		if !rule.Equal(other.Rules[i]) {
			return false
		}
	}
	return true
}
Equal returns true if both rules are equals
package css
import (
	"fmt"
	"strings"
)
const (
	indentSpace = 2
)
type RuleKind int
const (
	QualifiedRule RuleKind = iota
	AtRule
)
var atRulesWithRulesBlock = []string{
	"@document", "@font-feature-values", "@keyframes", "@media", "@supports",
}
type Rule struct {
	Kind RuleKind
	Name string
	Prelude string
	Selectors []string
	Declarations []*Declaration
	Rules []*Rule
	EmbedLevel int
}
func NewRule(kind RuleKind) *Rule {
	return &Rule{
		Kind: kind,
	}
}
func (kind RuleKind) String() string {
	switch kind {
	case QualifiedRule:
		return "Qualified Rule"
	case AtRule:
		return "At Rule"
	default:
		return "WAT"
	}
}
func (rule *Rule) EmbedsRules() bool {
	if rule.Kind == AtRule {
		for _, atRuleName := range atRulesWithRulesBlock {
			if rule.Name == atRuleName {
				return true
			}
		}
	}
	return false
}