MediaWiki:Mobile.less/fonts.less

From Old School RuneScape Wiki
Jump to: navigation, search
// <pre>
/* ==================
        variables
   ================== */

@system-font-stack: system-ui, -apple-system, Roboto, Helvetica, sans-serif;
@header-color: @river-bed;

/* ==================================================
       Fonts licensed under Open Font License 1.1.
       This license is available with a FAQ at:
       <https://scripts.sil.org/OFL>
   ================================================== */

// <https://www.paratype.com/fonts/pt/pt-serif?tab=packages> PT Serif
@font-face {
    font-family: 'PT Serif';
    font-weight: normal;
    font-style: normal;
    font-display: swap;
    src: url('filepath://PT-Serif_Regular.woff') format('woff');
}
@font-face {
    font-family: 'PT Serif';
    font-weight: normal;
    font-style: italic;
    font-display: swap;
    src: url('filepath://PT-Serif_Italic.woff') format('woff');
}
@font-face {
    font-family: 'PT Serif';
    font-weight: bold;
    font-style: normal;
    font-display: swap;
    src: url('filepath://PT-Serif_Bold.woff') format('woff');
}
@font-face {
    font-family: 'PT Serif';
    font-weight: bold;
    font-style: italic;
    font-display: swap;
    src: url('filepath://PT-Serif_Bold-Italic.woff') format('woff');
}

/* ==================
          body
   ================== */

// use system font instead of IBM Plex Sans for faster load times
body {
    font-family: @system-font-stack;
    
    // default is too small
    @media all and (max-width: 320px) {
        font-size: .9em;
    }

}

#mw-content-text {
    line-height: 1.7em;
}

@font-face {
    font-family: 'RuneScape';
    font-style: normal;
    font-weight: normal;
    src: local("RuneScape Plain 12"),
         url('filepath://RuneScape.woff') format('woff');
}

@font-face {
    font-family: 'RuneScape';
    font-style: normal;
    font-weight: bold;
    src: local("RuneScape Bold"),
         local("RuneScape Bold 12"),
         local("RuneScape Chat 2"),
         local("RuneScape Chat"),
         url('filepath://RuneScape_Bold.woff') format('woff');
}

@font-face {
    font-family: 'RuneScape Small';
    font-style: normal;
    font-weight: normal;
    src: local("RuneScape Plain 12"),
         url('filepath://RuneScape_Small.woff') format('woff');
}

/* ==================
        headers
   ================== */

.pre-content h1, // page title
.content h1,
.content h2 {
    color: @header-color;
    font-weight: bold;
    font-family: @serif-stack;
}

h3,
h4,
h5,
h6 {
    color: @header-color;
    font-family: @system-font-stack;
}