aimementoring / website

AIME Mentoring Website
2 stars 0 forks source link

CSS: Review @font-face rules #715

Closed github-actions[bot] closed 4 years ago

github-actions[bot] commented 4 years ago

CSS: Review @font-face rules

https://github.com/aimementoring/website/blob/cd27c3743b492fa7b93950163b1a86620412e343/styles/typography.module.scss#L60

  font-family: 'Luna Emu';
  font-style: normal;
  font-weight: normal;
  src: url($cdnRoot+"assets/fonts/luna-emu/LunaEmu-Regular.woff2") format('woff2'),
    url($cdnRoot+"assets/fonts/luna-emu/LunaEmu-Regular.woff") format('woff');
}

// GT Pressura Mono
@font-face {
  font-family: 'GT Pressura Mono';
  font-style: normal;
  font-weight: 400;
  src: url($cdnRoot+"assets/fonts/gt-pressura/gt-pressura-mono-regular-webfont.woff2");
}

@font-face {
  font-family: 'GT Pressura Mono Italic';
  font-style: normal;
  font-weight: 400;
  src: url($cdnRoot+"assets/fonts/gt-pressura/gt-pressura-mono-regular-italic-webfont.woff2");
}

@font-face {
  font-family: 'GT Pressura Mono Bold';
  font-style: normal;
  font-weight: 600;
  src: url($cdnRoot+"assets/fonts/gt-pressura/gt-pressura-mono-bold-webfont.woff2");
}

@font-face {
  font-family: 'GT Pressura Mono Bold Italic';
  font-style: normal;
  font-weight: 600;
  src: url($cdnRoot+"assets/fonts/gt-pressura/gt-pressura-mono-bold-italic-webfont.woff2");
}

// Univers
@font-face {
  font-family: 'Univers';
  font-style: normal;
  font-weight: 400;
  src: url($cdnRoot + 'assets/fonts/universal/UniversLTStd.otf');
}

@font-face {
  font-family: 'Univers';
  font-style: normal;
  font-weight: 300;
  src: url($cdnRoot + 'assets/fonts/universal/UniversLTStd-Light.otf');
}

@font-face {
  font-family: 'Univers';
  font-style: normal;
  font-weight: 500;
  src: url($cdnRoot + 'assets/fonts/universal/UniversLTStd-Bold.otf');
}

// @todo CSS: Review @font-face rules
// Can't we just have one reference to Poppins and then bring in various weights? Maybe should look into variable fonts / combining just the glyphs we need 

// Poppins
@font-face {
  font-family: 'PoppinsLight';
  font-style: normal;
  font-weight: 100;
  src: url($cdnRoot + 'assets/fonts/poppins/Poppins-Light.ttf');
}

@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 300;
  src: url($cdnRoot + 'assets/fonts/poppins/Poppins-Medium.ttf');
}

@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 400;
  src: local(), url($cdnRoot + 'assets/fonts/poppins/Poppins-SemiBold.ttf');
}

@font-face {
  font-family: 'PoppinsBlackItalic';
  font-style: normal;
  font-weight: 900;
  src: url($cdnRoot + 'assets/fonts/poppins/Poppins-BlackItalic.ttf');
}

@font-face {
  font-family: 'PoppinsBold';
  font-style: normal;
  font-weight: 500;
  src: url($cdnRoot + 'assets/fonts/poppins/Poppins-Bold.ttf');
}

@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 500;
  src: url($cdnRoot + 'assets/fonts/poppins/Poppins-BoldItalic.ttf');
}

// Material Icons
@font-face {
  font-family: 'Material Icons';
  font-style: normal;
  font-weight: 400;
  src: url($cdnRoot + 'assets/fonts/material-icons/MaterialIcons-Regular.eot'); /* For IE6-8 */
  src: local('Material Icons'),
    local('MaterialIcons-Regular'),
    url($cdnRoot + 'assets/fonts/material-icons/MaterialIcons-Regular.woff2') format('woff2'),
    url($cdnRoot + 'assets/fonts/material-icons/MaterialIcons-Regular.woff') format('woff'),
    url($cdnRoot + 'assets/fonts/material-icons/MaterialIcons-Regular.ttf') format('truetype');
}

// Indie Flower
@font-face {
  font-family: 'Indie Flower';
  font-style: normal;
  font-weight: 400;
  src: url($cdnRoot + 'assets/fonts/indie-flower/IndieFlower.ttf');
}

%materialIcons {
  direction: ltr;
  display: inline-block;
  font-family: 'Material Icons';
  font-feature-settings: 'liga';       // Support for IE.
  font-size: 24px;  /* Preferred icon size */

  -webkit-font-smoothing: antialiased; // Support for all WebKit browsers.
  -moz-osx-font-smoothing: grayscale;  // Support for Firefox.
  font-style: normal;
  font-weight: normal;
  letter-spacing: normal;
  line-height: 1;
  text-rendering: optimizeLegibility;  // Support for Safari and Chrome.
  text-transform: none;
  white-space: nowrap;
  word-wrap: normal;
}
ew file mode 100644
ndex 000000000..47b145aef
++ b/styles/variables.module.scss

e053e27e4b41a5e88db36a7df49c4c9005c200db