@SuppressWarnings( "unchecked" )
	public static Object joinStyles( Object style1, Object style2 )
		throws IllegalArgumentException
	{
		if( style1 == null )
			return style2;
		if( style2 == null )
			return style1;

		// join two strings
		if( style1 instanceof String && style2 instanceof String )
			return style1 + "; " + style2;

		// convert first style to map
		Map<String, Object> map1 = (style1 instanceof String)
			? parse( (String) style1 )
			: (Map<String, Object>) style1;
		if( map1 == null )
			return style2;

		// convert second style to map
		Map<String, Object> map2 = (style2 instanceof String)
			? parse( (String) style2 )
			: (Map<String, Object>) style2;
		if( map2 == null )
			return style1;

		// join two maps
		Map<String, Object> map = new HashMap<>( map1 );
		map.putAll( map2 );
		return map;
	}
Joins two styles. They can be either strings (in CSS syntax)
or {@link java.util.Map}&lt;String, Object&gt; (with binary values).
<p>
If both styles are strings, then a joined string is returned.
If both styles are maps, then a joined map is returned.
If one style is a map and the other style a string, then the string
is parsed (using {@link #parse(String)}) to a map and a joined map is returned.

@param style1 first style as string or map, or {@code null}
@param style2 second style as string or map, or {@code null}
@return new joined style
flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatStylingSupport.java