Skip to content

Commit

Permalink
fix and render fonts in noto sans in docs
Browse files Browse the repository at this point in the history
  • Loading branch information
clairesunstudio committed Oct 7, 2020
1 parent b63fe5a commit 820c55d
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 15 deletions.
2 changes: 1 addition & 1 deletion assets/scss/00-base/_fonts-langs.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
@mixin langlist($stack, $dir, $langs) {
@each $lang in $langs {
&:lang(#{$lang}) {
font-family: '#{$stack} VF', $stack, $fonts;
font-family: '#{$stack} VF', $stack, $fonts !important;
@if $enable-rtl { direction: $dir;}

}
Expand Down
3 changes: 0 additions & 3 deletions assets/scss/00-base/_fonts.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@

@use "paths" as *;

// load additional fonts for language support
@use "fonts-langs-import";

/* The fallback non-variable Noto Sans font */

@font-face {
Expand Down
7 changes: 4 additions & 3 deletions react/src/components/base/Typography/Typography.stories.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { styled } from '@storybook/theming';
import { Canvas, Meta, Story, ArgsTable, CURRENT_SELECTION } from '@storybook/addon-docs/blocks';
import DecorativeLink from 'MayflowerReactLinks/DecorativeLink';
import Heading from 'MayflowerReactHeadings/Heading';
import RichText from 'MayflowerReactOrganisms/RichText';

import {
characters,
Expand Down Expand Up @@ -35,12 +36,12 @@ const slugifyStyle = (style) => {

It's selected to be the Mayflower typeface to:
- enable all Commonwealth agencies to design, produce and deliver online and offline content with consistent typography, without additional costs or legal barriers.
- provide the best language coverage for content internationalization.
- provide comprehensive language coverage for content internationalization.
- support the guiding principles of the Mass.gov brand identities: modern, dignified, human, helpful


## Characters
<div className="sb-block">
<RichText className="sb-block">
<div className="sb-text">{letters.toUpperCase()}</div>
<div className="sb-text">{letters}</div>
<hr />
Expand All @@ -49,7 +50,7 @@ It's selected to be the Mayflower typeface to:
<hr />
<div className="sb-text">{characters}</div>
<hr />
</div>
</RichText>


## Custom Preview
Expand Down
12 changes: 5 additions & 7 deletions react/src/components/base/Typography/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,15 @@
@use "00-base/fonts";
@use "00-base/elements";
@use "04-templates/general";
@use "00-base/fonts-langs-import";
@use "00-base/fonts-langs";

.sb {
&-text {
overflow-wrap: break-word;
}

&-block {
// font-family: $fonts !important;
//
// &:lang(km) {
// font-family: $fonts-khmer, $fonts !important;
// font-size: 14px;
// }

margin-top: 0 !important;
margin-bottom: 2rem;
padding: 1rem;
Expand Down Expand Up @@ -49,6 +44,9 @@
th,td:not(:last-child) {
display: none;
}
textarea {
font-size: $fonts-medium;
}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion react/src/components/styles/_global.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@forward "00-base/global" with (
$assets-path: "~@massds/mayflower-assets/static" !default,
$enable-rtl: true !default,
$enable-rtl: true
);
@forward "00-base/z-index";

0 comments on commit 820c55d

Please sign in to comment.