Skip to content

Commit

Permalink
chore(Accessibility): BREAKING CHANGE - base font weight increased to…
Browse files Browse the repository at this point in the history
… 400
  • Loading branch information
shani-terminus authored and benjamincharity committed Apr 9, 2019
1 parent 39f6689 commit 7055c85
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 16 deletions.
15 changes: 13 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ The library of UI components used for Terminus applications.
- [Constants](#constants)
- [Style Helpers](#style-helpers)
- [Installation](#installation)
- [Global Styles](#global-styles)
- [Fonts and Typefaces](#fonts-and-typefaces)
- [Global Styles](#global-styles)
- [SCSS Helpers](#scss-helpers)
- [Contributing](#contributing)
- [Contributors](#contributors)
Expand Down Expand Up @@ -222,7 +223,17 @@ $ yarn add @amcharts/amcharts4 @amcharts/amcharts4-geodata
```


## Global Styles
### Fonts and Typefaces

Add the following links to install the body fonts and icon fonts used by the library:

```html
<link href="https://fonts.googleapis.com/css?family=Roboto:400,500,700" rel="stylesheet">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
```


### Global Styles

To use the global styles, import the CSS file into your stylesheets:

Expand Down
2 changes: 1 addition & 1 deletion demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="favicon.ico">
<link href="https://fonts.googleapis.com/css?family=Roboto:300,500,700" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Roboto:400,500,700" rel="stylesheet">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
</head>
<body>
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@
"release": {
"branch": "master",
"plugins": [
["@semantic-release/release-notes-generator",
[
"@semantic-release/release-notes-generator",
{
"parserOpts": {
"noteKeywords": [
Expand Down Expand Up @@ -172,7 +173,7 @@
"@angular/platform-browser": "^7.2.2",
"@angular/platform-browser-dynamic": "^7.2.2",
"@angular/router": "^7.2.2",
"@terminus/ngx-tools": ">=5.0.0",
"@terminus/ngx-tools": "^6.3.0",
"@terminus/ui": "latest",
"date-fns": "2.0.0-alpha.26",
"ngx-perfect-scrollbar": "^7.2.0",
Expand Down
2 changes: 1 addition & 1 deletion terminus-ui/csv-entry/src/csv-entry.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@

&--invalid {
color: color(warn);
font-weight: 400;
font-weight: $type__weight--base;
}
}

Expand Down
2 changes: 1 addition & 1 deletion terminus-ui/link/src/link.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
.mat-menu-content & {
color: color(pure, dark);
display: block;
font-weight: 300;
font-weight: $type__weight--base;
padding: spacing(small, 1) spacing();
text-decoration: none;
transition: background 400ms $g-material-background-easing;
Expand Down
2 changes: 1 addition & 1 deletion terminus-ui/navigation/src/navigation.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@

// <span> wrapper for welcome message
&-welcome {
font-weight: 300;
font-weight: $type__weight--base;
}

// <ts-icon>
Expand Down
8 changes: 4 additions & 4 deletions terminus-ui/scss/helpers/_typography.scss
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ $type__size--base: 16px !default;
* @nuclide
* @section Typography
*/
$type__weight--base: 300 !default;
$type__weight--base: 400 !default;

/**
* The available typography formats
Expand Down Expand Up @@ -146,7 +146,7 @@ $typography-body-levels: (

@if $level == 4 {
font-size: 112px;
font-weight: 300;
font-weight: 400;
letter-spacing: -.01em;
line-height: 112px;
}
Expand Down Expand Up @@ -189,7 +189,7 @@ $typography-body-levels: (
}

@if $level == 1 {
font-weight: 300;
font-weight: 400;

// TODO: overwrite in files rather than this nested chain (too specific) https://github.com/GetTerminus/terminus-ui/issues/1152
// Don't apply custom line-height to buttons
Expand Down Expand Up @@ -227,7 +227,7 @@ $typography-body-levels: (
@if $format == 'hint' {
color: color(utility);
font-size: 75%;
font-weight: 300;
font-weight: 400;
letter-spacing: .01em;
line-height: 1.5;
}
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -780,10 +780,10 @@
into-stream "^4.0.0"
lodash "^4.17.4"

"@terminus/ngx-tools@>=5.0.0":
version "6.1.0"
resolved "https://registry.yarnpkg.com/@terminus/ngx-tools/-/ngx-tools-6.1.0.tgz#34f4935879904c7630118bb2df131eecd12e79da"
integrity sha512-bW8ch5/n7PpSkj//00SBmbW+iJi78uTEYM67oFd4J6+enqK8CKZWe43w5f+GKhl7k0hzVyllfJ53x+7SS77rHw==
"@terminus/ngx-tools@^6.3.0":
version "6.3.0"
resolved "https://registry.yarnpkg.com/@terminus/ngx-tools/-/ngx-tools-6.3.0.tgz#146b7cdadbc21bdd8d3cef6ff9c6d1b89fc98f22"
integrity sha512-4V4zC/Ctg5GPzb+gUdpUJf3yx+C4j2EAFDFaEaBNUGgoTSIynbVSqFgJAQOz3iVgqAvXNi/FpiJbsDs+kdNafA==
dependencies:
tslib "^1.9.0"

Expand Down

0 comments on commit 7055c85

Please sign in to comment.