Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

Commit

Permalink
Feat/apply new typography (#27)
Browse files Browse the repository at this point in the history
* feat: added new font and changed type styles

* feat: added new font and changed type styles

* fix: adjusted font family and styles
  • Loading branch information
mgaseta authored Nov 25, 2022
1 parent 431da0d commit 8df9c37
Show file tree
Hide file tree
Showing 22 changed files with 59 additions and 0 deletions.
Binary file added src/assets/font/BCSans-Bold.eot
Binary file not shown.
Binary file added src/assets/font/BCSans-Bold.otf
Binary file not shown.
Binary file added src/assets/font/BCSans-Bold.ttf
Binary file not shown.
Binary file added src/assets/font/BCSans-Bold.woff
Binary file not shown.
Binary file added src/assets/font/BCSans-Bold.woff2
Binary file not shown.
Binary file added src/assets/font/BCSans-BoldItalic.eot
Binary file not shown.
Binary file added src/assets/font/BCSans-BoldItalic.otf
Binary file not shown.
Binary file added src/assets/font/BCSans-BoldItalic.ttf
Binary file not shown.
Binary file added src/assets/font/BCSans-BoldItalic.woff
Binary file not shown.
Binary file added src/assets/font/BCSans-BoldItalic.woff2
Binary file not shown.
Binary file added src/assets/font/BCSans-Italic.eot
Binary file not shown.
Binary file added src/assets/font/BCSans-Italic.otf
Binary file not shown.
Binary file added src/assets/font/BCSans-Italic.ttf
Binary file not shown.
Binary file added src/assets/font/BCSans-Italic.woff
Binary file not shown.
Binary file added src/assets/font/BCSans-Italic.woff2
Binary file not shown.
Binary file added src/assets/font/BCSans-Regular.eot
Binary file not shown.
Binary file added src/assets/font/BCSans-Regular.otf
Binary file not shown.
Binary file added src/assets/font/BCSans-Regular.ttf
Binary file not shown.
Binary file added src/assets/font/BCSans-Regular.woff
Binary file not shown.
Binary file added src/assets/font/BCSans-Regular.woff2
Binary file not shown.
6 changes: 6 additions & 0 deletions src/custom.scss
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
@use './theme/light-theme.scss' as light;
@use './theme/colors.scss' as colors;
@use './theme/type-family.scss' as types;

@use './theme/components-overrides.scss';

@use '@carbon/type/scss/_font-family.scss' with (
$font-families: types.$type-family,
$font-weights: types.$font-weights
);

// Set the correct light theme
@use '@carbon/react/scss/themes';
@use '@carbon/react/scss/theme' with (
Expand Down
53 changes: 53 additions & 0 deletions src/theme/type-family.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
@use 'sass:string';

@font-face {
font-family: "BC Sans";
src: url('../assets/font/BCSans-Regular.woff') format('woff'),
url('../assets/font/BCSans-Regular.woff2') format('woff2');
font-style: normal;
font-weight: normal;
}

@font-face {
font-family: "BC Sans";
src: url('../assets/font/BCSans-Italic.woff') format('woff'),
url('../assets/font/BCSans-Italic.woff2') format('woff2');
font-style: italic;
font-weight: normal;
}

@font-face {
font-family: "BC Sans";
src: url('../assets/font/BCSans-Bold.woff') format('woff'),
url('../assets/font/BCSans-Bold.woff2') format('woff2');
font-style: normal;
font-weight: bold;
}

@font-face {
font-family: "BC Sans";
src: url('../assets/font/BCSans-BoldItalic.woff') format('woff'),
url('../assets/font/BCSans-BoldItalic.woff2') format('woff2');
font-style: italic;
font-weight: bold;
}

$type-family: (
'mono':
string.unquote(
"'IBM Plex Mono', system-ui, -apple-system, BlinkMacSystemFont, '.SFNSText-Regular', monospace"
),
'sans':
string.unquote(
"'BC Sans', 'IBM Plex Sans', system-ui, -apple-system, BlinkMacSystemFont, '.SFNSText-Regular', sans-serif"
),
);

// Light and regular have the same value because we don't have a light value
// for font-weight, so we use only the regular value whenever is intend to use
// the ligth value
$font-weights: (
'light': 400,
'regular': 400,
'bold': 700,
);

0 comments on commit 8df9c37

Please sign in to comment.