/**
 * Copyright (c) Enalean, 2016-Present. All Rights Reserved.
 *
 * This file is a part of Tuleap.
 *
 * Tuleap is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * Tuleap is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with Tuleap. If not, see <http://www.gnu.org/licenses/>.
 */

$assets-base-path: "../../" !default;

@function asset-url($file_path) {
    @return url(#{$assets-base-path + $file_path});
}

%-tlp-avatar {
    display: inline-block;
    flex: 0 0 auto;
    overflow: hidden;
    border-radius: 50%;
    background: var(--tlp-neutral-normal-color) asset-url("images/tlp-default-avatar.svg") no-repeat
        center center;
    background-size: contain;
    vertical-align: middle;

    > img {
        width: 100%;
        height: 100%;
    }
}

.tlp-avatar-jumbo {
    @extend %-tlp-avatar;

    width: 96px;
    height: 96px;
}

.tlp-avatar-extra-large {
    @extend %-tlp-avatar;

    width: 72px;
    height: 72px;
}

.tlp-avatar-large {
    @extend %-tlp-avatar;

    width: 48px;
    height: 48px;
}

.tlp-avatar {
    @extend %-tlp-avatar;

    width: 40px;
    height: 40px;
}

.tlp-avatar-medium {
    @extend %-tlp-avatar;

    width: 32px;
    height: 32px;
}

.tlp-avatar-small {
    @extend %-tlp-avatar;

    width: 24px;
    height: 24px;
}

.tlp-avatar-mini {
    @extend %-tlp-avatar;

    width: 20px;
    height: 20px;
}
