@mixin font-dimensions($font-size, $line-height, $letter-spacing: normal)
{
    font-size: $font-size;
    line-height: $line-height;
    letter-spacing: $letter-spacing;
}

@mixin serif-font-family
{
    font-family: "Fedra Serif A Pro", "Times New Roman", Times, serif;
}

@mixin sans-serif-font-family
{
    font-family: "FS Me", Arial, Helvetica, sans-serif;
}

@mixin heading
{
    @include serif-font-family;

    margin-top: steps(3.5);
    margin-bottom: steps(1.5);

    font-weight: bold;
    color: $color-text-darker;

    &:first-child
    {
        margin-top: 0;
    }

    @include for-at-least-normal-tablets
    {
        margin-top: steps(4);
        margin-bottom: steps(2);
    }
}

@mixin extra-large-heading($extra-top-padding: 0, $extra-bottom-padding: 0)
{
    @include heading;
    @include baseline-box(28px, steps(4), -0.15px, $extra-top-padding, $extra-bottom-padding);

    @include for-at-least-normal-tablets
    {
        @include baseline-box(38px, steps(5), -0.2px, $extra-top-padding, $extra-bottom-padding);
    }
}

@mixin large-heading($extra-top-padding: 0, $extra-bottom-padding: 0)
{
    @include heading;
    @include baseline-box(26px, steps(3.5), -0.14px, $extra-top-padding, $extra-bottom-padding);

    @include for-at-least-normal-tablets
    {
        @include baseline-box(32px, steps(5), -0.17px, $extra-top-padding, $extra-bottom-padding);
    }
}

@mixin normal-heading($extra-top-padding: 0, $extra-bottom-padding: 0)
{
    @include heading;
    @include baseline-box(22px, steps(3), -0.12px, $extra-top-padding, $extra-bottom-padding);

    @include for-at-least-normal-tablets
    {
        @include baseline-box(28px, steps(4), -0.15px, $extra-top-padding, $extra-bottom-padding);
    }
}

@mixin small-heading($extra-top-padding: 0, $extra-bottom-padding: 0)
{
    @include heading;
    @include baseline-box(18px, steps(3), -0.10px, $extra-top-padding, $extra-bottom-padding);

    @include for-at-least-normal-tablets
    {
        @include baseline-box(24px, steps(4), -0.13px, $extra-top-padding, $extra-bottom-padding);
    }
}


@mixin double-extra-large-text($extra-top-padding: 0, $extra-bottom-padding: 0)
{

}

@mixin extra-large-text($extra-top-padding: 0, $extra-bottom-padding: 0)
{

}

@mixin large-text($extra-top-padding: 0, $extra-bottom-padding: 0)
{
    @include baseline-box(22px, steps(3), 0.7px, $extra-top-padding, $extra-bottom-padding);

    margin-bottom: steps(3);

    &:last-child
    {
        margin-bottom: 0;
    }

    @include for-at-least-normal-tablets
    {
        @include baseline-box(24px, steps(4), -0.1px, $extra-top-padding, $extra-bottom-padding);
    }
}

@mixin normal-text($extra-top-padding: 0, $extra-bottom-padding: 0)
{
    @include baseline-box(16px, steps(2.5), 0.5px, $extra-top-padding, $extra-bottom-padding);

    margin-bottom: steps(2);

    &:last-child
    {
        margin-bottom: 0;
    }

    @include for-at-least-normal-tablets
    {
        @include baseline-box(18px, steps(3), 0.6px, $extra-top-padding, $extra-bottom-padding);
    }
}

@mixin small-text($extra-top-padding: 0, $extra-bottom-padding: 0)
{
    @include baseline-box(14px, steps(2), 0.6px, $extra-top-padding, $extra-bottom-padding);

    @include for-at-least-normal-tablets
    {
        @include baseline-box(16px, steps(3), 0.5px, $extra-top-padding, $extra-bottom-padding);
    }
}

@mixin extra-small-text($extra-top-padding: 0, $extra-bottom-padding: 0)
{
    @include baseline-box(12px, steps(2), 0.5px, $extra-top-padding, $extra-bottom-padding);

    @include for-at-least-normal-tablets
    {
        @include baseline-box(14px, steps(2), 0.6px, $extra-top-padding, $extra-bottom-padding);
    }
}

@mixin double-extra-small-text($extra-top-padding: 0, $extra-bottom-padding: 0)
{

}


@mixin alternative-text
{
    @include baseline-box(16px, steps(2.5), 0.5px);

    a
    {
        @include alternative-link;
    }
}

@mixin hidden-text
{
    overflow: hidden;
    text-indent: 100%;
    white-space: nowrap;
}

// switch from subpixel rendering to antialiasing
// to make text on dark background look lighter
@mixin antialiasing
{
    -moz-osx-font-smoothing: grayscale;
     -webkit-font-smoothing: antialiased;
}

@mixin antialiasing-reset
{
    -moz-osx-font-smoothing: auto;
     -webkit-font-smoothing: auto;
}
