Class AutoExpandBrowserPrefix

java.lang.Object
com.google.common.css.compiler.ast.DefaultTreeVisitor
com.google.common.css.compiler.passes.AutoExpandBrowserPrefix
All Implemented Interfaces:
AtRuleHandler, CssCompilerPass, CssTreeVisitor

public class AutoExpandBrowserPrefix extends DefaultTreeVisitor implements CssCompilerPass
A compiler pass that automatically detects certain properties that need additional browser specific property declarations, and adds them. The properties to be matched for expansion are provided by the BrowserPrefixGenerator.

This mechanism is an alternative to using conventional mixins. Problems with conventional mixins: - developers have to always remember to use the mixin consistently - they have to go find the appropriate mixins - the framework has to to verify the code and ensure mixins were used correctly Automation addresses all of the above issues.

Currently three most common cases are handled: #1 Matching and replacing only the property name. Eg. flex-grow: VALUE; #2 Matching property name and value, replacing the value. Eg. display: flex; #3 Matching property name and value where value is a function, replacing the function name. Eg. background-image: linear-gradient(ARGS);