Class AttributeResolver
java.lang.Object
dev.jcputney.mjml.context.AttributeResolver
Resolves attributes for a component using the 5-level cascade:
- Inline attributes (on the element itself)
- mj-class attributes
- Tag-specific default attributes (mj-attributes > mj-section, etc.)
- mj-all default attributes
- Component hardcoded defaults
-
Method Summary
-
Method Details
-
resolve
public static String resolve(MjmlNode node, String attributeName, GlobalContext globalContext, Map<String, String> componentDefaults) Resolves an attribute value using the 5-level cascade.- Parameters:
node- the element nodeattributeName- the attribute to resolveglobalContext- the document-wide contextcomponentDefaults- the component's hardcoded default values- Returns:
- the resolved attribute value, or null if not found at any level
-