Skip to content

Commit

Permalink
Merge pull request #40 from glyphic-co/release-0.11.0
Browse files Browse the repository at this point in the history
Release 0.11.0
  • Loading branch information
theorosendorf committed Mar 27, 2019
2 parents 687c5ca + 6a09891 commit eddfe55
Show file tree
Hide file tree
Showing 8 changed files with 2,296 additions and 99 deletions.
18 changes: 18 additions & 0 deletions CHANGELOG.md
Expand Up @@ -14,6 +14,24 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

---

## [0.11.0] - 2019-03-27

### Added
- husky
- pre-commit hook for lint-staged (Enforce ESLinting on commit)

### Changed
- Edit documentation
- Format documentation

### Deprecated
- Variable names from v0.10.0

### Fixed
- Activated linting

---

## [0.10.0] - 2019-01-26

### Added
Expand Down
42 changes: 21 additions & 21 deletions README.md
Expand Up @@ -22,18 +22,18 @@ Textblock([{
- **`target`** (required  ): The element that should be resized `".your‑class"`, `"#some-id p"`
- **`minWidth`**: default `320`
- **`maxWidth`**: default `960`
- **`minWidthFontSize`**: default `1.0`
- **`maxWidthFontSize`**: default `1.8`
- **`minWidthLineHeight`**: default `1.33` (unitless values only)
- **`maxWidthLineHeight`**: default `1.25` (unitless values only)
- **`minWidthVariableGrade`**: A variable font weight for the small size, for example `450`
- **`maxWidthVariableGrade`**: A variable font weight for the large size, i.e. `400`
- **`minWidth_FontSize`**: default `1.0`
- **`maxWidth_FontSize`**: default `1.8`
- **`minWidth_LineHeight`**: default `1.33` (unitless values only)
- **`maxWidth_LineHeight`**: default `1.25` (unitless values only)
- **`minWidth_VariableGrade`**: A variable font weight for the small size, for example `450`
- **`maxWidth_VariableGrade`**: A variable font weight for the large size, i.e. `400`
- **`container`**: The container width to measure. Defaults to `"parent"` and can alternately be set to `"self"`.
- **`units`**: default `em`
- **`fontSize_Units`**: default `em`

For a better sense of context, set your root em to `10px` with `html { font-size: 62.5%; }`. This makes your em units base 10 so `2.4em` = `24px`. But any number will do because once you start adjusting the min/max numbers, the experience is more visual than calculated. And if you prefer a more scientific approach, Textblock gives you the control you need for setting systems like modular scales.

If you’re using variable fonts, the `minWidthVariableGrade` / `maxWidthVariableGrade` parameters provide a way to simulate grades (micro-variations in weight to set smaller sizes slightly bolder).
If you’re using variable fonts, the `minWidth_VariableGrade` / `maxWidth_VariableGrade` parameters provide a way to simulate grades (micro-variations in weight to set smaller sizes slightly bolder).

## Example Including Extra Parameters

Expand All @@ -42,14 +42,14 @@ Textblock([{
 target: ".some-class",
 minWidth: 280,
 maxWidth: 800,
minWidthFontSize: 1.9,
maxWidthFontSize: 2.6,
minWidthLineHeight: 1.33,
maxWidthLineHeight: 1.25,
minWidthVariableGrade: 366,
maxWidthVariableGrade: 300,
minWidth_FontSize: 1.9,
maxWidth_FontSize: 2.6,
minWidth_LineHeight: 1.33,
maxWidth_LineHeight: 1.25,
minWidth_VariableGrade: 366,
maxWidth_VariableGrade: 300,
 container: "self",
units: "rem"
fontSize_Units: "rem"
}]);
```

Expand All @@ -59,15 +59,15 @@ Textblock([{
Textblock([
 {
  target: ".some-class",
  minWidthFontSize: 1.9,
  maxWidthFontSize: 2.6
  minWidth_FontSize: 1.9,
  maxWidth_FontSize: 2.6
 },
 {
  target: ".another-class",
  minWidthFontSize: 2.4,
  maxWidthFontSize: 3.6,
  minWidthVariableGrade: 450,
  maxWidthVariableGrade: 400,
  minWidth_FontSize: 2.4,
  maxWidth_FontSize: 3.6,
  minWidth_VariableGrade: 450,
  maxWidth_VariableGrade: 400,
  container: "self"
 }
]);
Expand Down

0 comments on commit eddfe55

Please sign in to comment.