/*
 * Copyright (C) 2022 The Gravitee team (http://gravitee.io)
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *         http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

/* stylelint-disable no-invalid-position-at-import-rule */

/**
 * Import Gio Design System fonts
 */
@mixin import-fonts($withTilde: false) {
  @if $withTilde == true {
    @import '~@fontsource/material-icons/400.css';
    @import '~@fontsource/fira-mono/400.css';
    @import '~@fontsource/kanit/400.css';
    @import '~@fontsource/kanit/500.css';
    @import '~@fontsource/kanit/600.css';
    @import '~@fontsource/manrope/400.css';
    @import '~@fontsource/manrope/500.css';
    @import '~@fontsource/manrope/600.css';
  }

  @if $withTilde == false {
    @import '@fontsource/material-icons/400.css';
    @import '@fontsource/fira-mono/400.css';
    @import '@fontsource/kanit/400.css';
    @import '@fontsource/kanit/500.css';
    @import '@fontsource/kanit/600.css';
    @import '@fontsource/manrope/400.css';
    @import '@fontsource/manrope/500.css';
    @import '@fontsource/manrope/600.css';
  }

  // Material Icons
  // https://fontsource.org/docs/getting-started/material-icons
  .material-icons {
    display: inline-block;
    direction: ltr;
    // stylelint-disable-next-line font-family-no-missing-generic-family-keyword
    font-family: 'Material Icons';

    /* Support for IE. */
    font-feature-settings: 'liga';
    font-size: 24px; /* Preferred icon size */

    /* Support for all WebKit browsers. */
    -webkit-font-smoothing: antialiased;

    /* Support for Firefox. */
    -moz-osx-font-smoothing: grayscale;
    font-style: normal;
    font-weight: normal;
    letter-spacing: normal;
    line-height: 1;

    /* Support for Safari and Chrome. */
    text-rendering: optimizelegibility;
    text-transform: none;
    white-space: nowrap;
    word-wrap: normal;
  }
}
