//
// Fixes for Bootstrap and Fontawesome bugs
//
// This file is part of the MediaWiki skin Chameleon.
// @copyright 2013 - 2019, Stephan Gambke, GNU General Public License, version 3 (or any later version)
//
// @since 2.0

// Add a max width for container when screen width is xs
@if $enable-grid-classes {
	@include media-breakpoint-down(xs) {
		.container {
			@include make-container-max-widths((xs: map_get($container-max-widths, sm)), $grid-breakpoints);
		}
	}
}

// Put the font setting on the :before pseudo element, not on the element itself
// Do not set the line-height on the element
.fa, .far, .fas, .fab {
	font-family: inherit;
	font-weight: inherit;
	line-height: inherit;

	&:before {
		line-height: 1;
	}
}

.fa, .fas {
	&:before {
		font-family: 'Font Awesome 5 Free';
		font-weight: 900;
	}
}

.far:before {
	font-family: 'Font Awesome 5 Free';
	font-weight: 400;
}

.fab:before {
	font-family: 'Font Awesome 5 Brands';
}

// When there is a "small" in the hierarchy, we mean it
.small .dropdown-menu > * {
	@extend .small;
	@include font-size( $small-font-size );
}

// fix dropdown width for RTL languages
&.rtl .dropdown-menu {
	/* @noflip */
	left: inherit !important;
}

.alert p:last-child {
	margin-bottom: 0;
}

.navbar-nav {
	// in minor axis direction, center-align navbar items
	align-items: center;

	.nav-link {
		// prevent ugly linebreaks within navbar links
		white-space: nowrap;
	}
}
