/*------------------------------------*\
    #JUSTIFY
\*------------------------------------*/

/**
 * Equally space items in the available space.
 */

/**
 * 1. Set the contents to justify.
 *
 * 2. Set child elements to display as inline block.
 *
 * 3. Add a pseudo element that is always displayed on a new line in order to
 *    trigger the justification. (Support for text-align-last is patchy.)
 *
 * 4. Optionally compensate for the additional height created by the pseudo
 *    element.
 */

.#{$sagovau-namespace}justify,
%#{$sagovau-namespace}justify {
    text-align: justify;    /* [1] */

    > * {
        display: inline-block;   /* [2] */
    }

    &::after {   /* [3] */
        content: '';
        display: inline-block;
        width: 100%;
    }

}

.#{$sagovau-namespace}justify--height-adjust,
%#{$sagovau-namespace}justify--height-adjust {
    margin-bottom: -$sagovau-spacing-unit-base; /* [4] */
}
