.components-toolbar {
	margin: 0;
	border: 1px solid $light-gray-500;
	background-color: $white;
	display: inline-flex;
}

div.components-toolbar {
	&> div {
		display: inline-flex;
		margin: 0;
	}

	&> div + div {
		margin-left: -3px;

		&.has-left-divider {
			margin-left: 6px;
			position: relative;
			overflow: visible;
		}

		&.has-left-divider:before {
			display: inline-block;
			content: '';
			box-sizing: content-box;
			background-color: $light-gray-500;
			position: absolute;
			top: 8px;
			left: -3px;
			width: 1px;
			height: $icon-button-size - 16px;
		}
	}
}

.components-toolbar__control.components-button {
	display: inline-flex;
	align-items: flex-end;
	margin: 0;
	padding: 3px;
	outline: none;
	cursor: pointer;
	position: relative;
	width: $icon-button-size;
	height: $icon-button-size;

	// unset icon button styles
	&:active,
	&:hover,
	&:focus {
		outline: none;
		box-shadow: none;
		background: none;
		border: none;
	}

	// disabled
	&:disabled {
		cursor: default;
	}

	& > svg {
		padding: 5px;
		box-sizing: content-box;
		border-radius: $button-style__radius-roundrect;
	}

	// subscript for numbered icon buttons, like headings
	&[data-subscript] svg {
		padding: 4px 8px 4px 0;
	}

	&[data-subscript]:after {
		content: attr( data-subscript );
		font-family: $default-font;
		font-size: $default-font-size;
		font-weight: 600;
		position: absolute;
		right: 8px;
		bottom: 8px;
	}

	// hover style
	&:not( :disabled ).is-active > svg,
	&:not( :disabled ):hover > svg {
		@include formatting-button-style__hover;
	}

	// active & toggled style
	&:not(:disabled).is-active > svg {
		@include formatting-button-style__active;
	}

	&:not(:disabled).is-active[data-subscript]:after {
		color: $white;
	}

	// focus style
	&:not(:disabled):focus > svg {
		@include formatting-button-style__focus;
	}
}

.components-toolbar__control .dashicon {
	display: block;
}
