/* ================================= */
/* CSS for control sap.tnt/InfoLabel */
/* Fiori 3 theme                     */
/* ================================= */


// ==========================================================================
// Variables and mixins
// ==========================================================================

@_sap_tnt_InfoLabel_ColorsArray:
	@sapUiLegendBackgroundColor1 @sapUiAccent1,
	@sapUiLegendBackgroundColor2 @sapUiAccent2,
	@sapUiLegendBackgroundColor3 @sapUiAccent3,
	@sapUiLegendBackgroundColor5 @sapUiAccent4,
	@sapUiLegendBackgroundColor20 @sapUiAccent5,
	@sapUiLegendBackgroundColor6 @sapUiAccent6,
	@sapUiLegendBackgroundColor7 @sapUiAccent7,
	@sapUiLegendBackgroundColor18 @sapUiLegend18,
	@sapUiLegendBackgroundColor10 @sapUiAccent10,
	@sapUiLegendBackgroundColor9 @sapUiAccent9;

.create-classes-for-background-and-border-colors(backgroundColor, @_sap_tnt_InfoLabel_ColorsArray);

// Iterate over the InfoLabel ColorsArray and create separate class for each
// color named with the passed prefix and the number of the color
.create-classes-for-background-and-border-colors(@prefix, @list) {
	.iter(length(@list));
	.iter(@i) when (@i > 0) {
		.iter(@i - 1);

		@pair: extract(@list, @i);
		@backgroundColor: extract(@pair, 1);
		@borderColor: extract(@pair, 2);

		.@{prefix}@{i} {
			border: 0.0625rem solid @borderColor;
			background-color: @backgroundColor;

			.sapTntInfoLabelInner {
				color: @sapUiBaseText;
			}
		}
	}
}