typography - Vaadin Add-on Directory
Polymer and Sass custom styles/mixins for applying D2L typography`, ``, `` and `` HTML elements, though it's not a requirement.
![screenshot of headings](/screenshots/headings.png?raw=true)
## Usage
Typography fonts and styles can be applied using either [Polymer](https://www.polymer-project.org/1.0/) or [Sass](http://sass-lang.com/) mixins. Which one you use depends on your technology stack and comfort with each, however since Sass compiles to native CSS it's more performant.
### Sass
Import the main `d2l-typography.scss` file into your application's Sass. Then call the `d2l-typography-font-face()` mixin to define the web fonts and apply the `d2l-typography()` mixin to your `` element:
```sass
@import 'bower_components/d2l-typography/d2l-typography.scss';
@include d2l-typography-font-face();
body {
@include d2l-typography();
}
```
Mixins are also available for standard body, compact body, small body and heading styles:
```sass
.standard {
@include d2l-body-standard();
}
.compact {
@include d2l-body-compact();
}
.small {
@include d2l-body-small();
}
.label {
@include d2l-label-text();
}
h1 {
@include d2l-heading-1();
}
h2 {
@include d2l-heading-2();
}
h3 {
@include d2l-heading-3();
}
h4 {
@include d2l-heading-4();
}
```
### Polymer
Include the [webcomponents.js](http://webcomponents.org/polyfills/) "lite" polyfill (for browsers who don't natively support web components), import `d2l-typography.html`, and include `d2l-typography` in a custom style block:
```html
```
The `d2l-typography` class can be used to set base font properties, typically applied to the `` element.
```html
...
```
Additional CSS classes are available for standard body, compact body, small body and headings:
```html
...
...
...
...
...
...
...
```
### Responsive Breakpoint
The fonts for headings, standard body, and compact body will all be styled to be smaller at a responsive breakpoint, defined as when the viewport width is 615px or smaller.
### Note About Font Size
Normally within Brightspace, the user-configured base font size will automatically be present, and requires no additional work to opt-in. However, if your application exists outside of Brightspace, you should set your desired font size on the `` element. The default recommended size is `20px`:
```css
html {
font-size: 20px;
}
```
## Coding styles
See the [Best Practices & Style Guide](https://github.com/Brightspace/valence-ui-docs/wiki/Best-Practices-&-Style-Guide) for information on naming conventions, plus information about the [EditorConfig](http://editorconfig.org) rules used in this repo.
[bower-url]: http://bower.io/search/?q=d2l-typography
[bower-image]: https://badge.fury.io/bo/d2l-typography.svg
[ci-url]: https://travis-ci.org/BrightspaceUI/typography
[ci-image]: https://img.shields.io/travis-ci/BrightspaceUI/typography.svg
## Versioning
Commits and PR merges to master will automatically do a minor version bump which will:
* Update the version in `package.json`
* Add a tag matching the new version
* Create a github release matching the new version
By using either **[increment major]** or **[increment patch]** notation inside your merge message, you can overwrite the default version upgrade of minor to the position of your choice.
` and `` HTML elements, though it's not a requirement.
![screenshot of headings](/screenshots/headings.png?raw=true)
## Usage
Typography fonts and styles can be applied using either [Polymer](https://www.polymer-project.org/1.0/) or [Sass](http://sass-lang.com/) mixins. Which one you use depends on your technology stack and comfort with each, however since Sass compiles to native CSS it's more performant.
### Sass
Import the main `d2l-typography.scss` file into your application's Sass. Then call the `d2l-typography-font-face()` mixin to define the web fonts and apply the `d2l-typography()` mixin to your `` element:
```sass
@import 'bower_components/d2l-typography/d2l-typography.scss';
@include d2l-typography-font-face();
body {
@include d2l-typography();
}
```
Mixins are also available for standard body, compact body, small body and heading styles:
```sass
.standard {
@include d2l-body-standard();
}
.compact {
@include d2l-body-compact();
}
.small {
@include d2l-body-small();
}
.label {
@include d2l-label-text();
}
h1 {
@include d2l-heading-1();
}
h2 {
@include d2l-heading-2();
}
h3 {
@include d2l-heading-3();
}
h4 {
@include d2l-heading-4();
}
```
### Polymer
Include the [webcomponents.js](http://webcomponents.org/polyfills/) "lite" polyfill (for browsers who don't natively support web components), import `d2l-typography.html`, and include `d2l-typography` in a custom style block:
```html
```
The `d2l-typography` class can be used to set base font properties, typically applied to the `` element.
```html
...
```
Additional CSS classes are available for standard body, compact body, small body and headings:
```html
...
...
...
...
...
...
...
```
### Responsive Breakpoint
The fonts for headings, standard body, and compact body will all be styled to be smaller at a responsive breakpoint, defined as when the viewport width is 615px or smaller.
### Note About Font Size
Normally within Brightspace, the user-configured base font size will automatically be present, and requires no additional work to opt-in. However, if your application exists outside of Brightspace, you should set your desired font size on the `` element. The default recommended size is `20px`:
```css
html {
font-size: 20px;
}
```
## Coding styles
See the [Best Practices & Style Guide](https://github.com/Brightspace/valence-ui-docs/wiki/Best-Practices-&-Style-Guide) for information on naming conventions, plus information about the [EditorConfig](http://editorconfig.org) rules used in this repo.
[bower-url]: http://bower.io/search/?q=d2l-typography
[bower-image]: https://badge.fury.io/bo/d2l-typography.svg
[ci-url]: https://travis-ci.org/BrightspaceUI/typography
[ci-image]: https://img.shields.io/travis-ci/BrightspaceUI/typography.svg
## Versioning
Commits and PR merges to master will automatically do a minor version bump which will:
* Update the version in `package.json`
* Add a tag matching the new version
* Create a github release matching the new version
By using either **[increment major]** or **[increment patch]** notation inside your merge message, you can overwrite the default version upgrade of minor to the position of your choice.
...
...
...
...
``` ### Responsive Breakpoint The fonts for headings, standard body, and compact body will all be styled to be smaller at a responsive breakpoint, defined as when the viewport width is 615px or smaller. ### Note About Font Size Normally within Brightspace, the user-configured base font size will automatically be present, and requires no additional work to opt-in. However, if your application exists outside of Brightspace, you should set your desired font size on the `` element. The default recommended size is `20px`: ```css html { font-size: 20px; } ``` ## Coding styles See the [Best Practices & Style Guide](https://github.com/Brightspace/valence-ui-docs/wiki/Best-Practices-&-Style-Guide) for information on naming conventions, plus information about the [EditorConfig](http://editorconfig.org) rules used in this repo. [bower-url]: http://bower.io/search/?q=d2l-typography [bower-image]: https://badge.fury.io/bo/d2l-typography.svg [ci-url]: https://travis-ci.org/BrightspaceUI/typography [ci-image]: https://img.shields.io/travis-ci/BrightspaceUI/typography.svg ## Versioning Commits and PR merges to master will automatically do a minor version bump which will: * Update the version in `package.json` * Add a tag matching the new version * Create a github release matching the new version By using either **[increment major]** or **[increment patch]** notation inside your merge message, you can overwrite the default version upgrade of minor to the position of your choice.GitHub Homepage
Online Demo
Issue tracker
View on GitHub
typography version 0.6.0
### Dependencies
typography version 1.0.0
### Dependencies
* vui-colors#^0.0.4
typography version 1.0.1
### Dependencies
* vui-colors#^0.0.4
typography version 1.0.2
### Dependencies
* vui-colors#^0.0.4
typography version 1.0.3
### Dependencies
* vui-colors#^0.0.4
typography version 1.0.4
### Dependencies
* vui-colors#^0.0.4
typography version 1.0.5
### Dependencies
* vui-colors#^0.0.4
typography version 1.0.6
### Dependencies
* vui-colors#^0.0.4
typography version 1.0.7
### Dependencies
* vui-colors#^0.0.4
typography version 1.0.8
### Dependencies
* vui-colors#^0.0.5
typography version 1.0.10
### Dependencies
* vui-colors#^0.1.0
typography version 1.0.11
### Dependencies
* vui-colors#^0.1.0
typography version 1.0.9
### Dependencies
* vui-colors#^0.1.0
typography version 1.1.0
### Dependencies
* vui-colors#^0.1.0
typography version 1.1.1
### Dependencies
* vui-colors#^0.1.0
typography version 1.1.2
### Dependencies
* vui-colors#^0.1.0
typography version 1.2.0
### Dependencies
* vui-colors#^0.2.0
typography version 1.2.1
### Dependencies
* vui-colors#^0.2.0
typography version 1.2.2
### Dependencies
* vui-colors#^0.2.0
typography version 2.0.0
### Dependencies
* vui-colors#^0.2.0
typography version 2.0.1
### Dependencies
* vui-colors#^0.2.0
typography version 2.0.2
### Dependencies
* vui-colors#^0.2.0
typography version 3.0.0
### Dependencies
* polymer#^1.4.0
* vui-colors#^1.0.1
typography version 3.1.0
### Dependencies
* polymer#^1.4.0
* vui-colors#^1.0.1
typography version 2.1.0
### Dependencies
* vui-colors#^0.2.0
typography version 4.0.0
### Dependencies
* d2l-colors#^2.0.0
* polymer#^1.5.0
typography version 2.2.0
### Dependencies
* vui-colors#^0.2.0
typography version 4.0.1
### Dependencies
* d2l-colors#^2.0.0
* polymer#^1.5.0
typography version 4.1.0
### Dependencies
* d2l-colors#^2.1.0
* polymer#^1.5.0
typography version 4.2.0
### Dependencies
* d2l-colors#^2.1.0
* polymer#^1.5.0
typography version 4.2.1
### Dependencies
* d2l-colors#^2.1.0
* polymer#^1.5.0
typography version 4.2.2
### Dependencies
* d2l-colors#^2.1.0
* polymer#^1.5.0
typography version 4.3.2
### Dependencies
* d2l-colors#^2.1.0
* polymer#^1.5.0
typography version 5.0.0
### Dependencies
* d2l-colors#^2.1.0
* polymer#^1.5.0
typography version 5.0.1
### Dependencies
* d2l-colors#^2.1.0
* polymer#^1.5.0
typography version 5.1.0
### Dependencies
* d2l-colors#^2.2.0
* polymer#^1.7.0
typography version 5.1.1
### Dependencies
* d2l-colors#^2.2.0
* polymer#^1.7.0
typography version 5.1.2
### Dependencies
* d2l-colors#^2.2.2
* polymer#^1.7.0
typography version 5.2.0
### Dependencies
* d2l-colors#^2.2.2
* polymer#^1.7.0
typography version 5.2.1
### Dependencies
* d2l-colors#^2.2.2
* polymer#^1.7.0
typography version 5.2.2
### Dependencies
* d2l-colors#^2.2.3
* polymer#^1.7.0
typography version 5.2.3
### Dependencies
* d2l-colors#^2.2.3
* polymer#^1.7.0
typography version 5.2.4
### Dependencies
* d2l-colors#^2.2.3
* polymer#^1.7.0
typography version 5.3.0
### Dependencies
* d2l-colors#^2.2.3
* polymer#^1.7.0
typography version 2.3.0
### Dependencies
* vui-colors#^0.2.0
typography version 5.4.0
### Dependencies
* d2l-colors#^2.2.3
* polymer#^1.7.0
typography version 6.0.0
### Dependencies
* polymer#Polymer/polymer#^1.9.1 || ^2.0.0
* d2l-colors#^2.3.0 || ^3.0.0
typography version 5.5.0
### Dependencies
* d2l-colors#^2.2.3
* polymer#^1.7.0
typography version 6.1.0
### Dependencies
* polymer#Polymer/polymer#^1.9.1 || ^2.0.0
* d2l-colors#^2.3.0 || ^3.0.0
typography version 6.1.1
### Dependencies
* polymer#Polymer/polymer#^1.9.1 || ^2.0.0
* d2l-colors#^3.0.0
typography version 6.1.2
### Dependencies
* polymer#1 - 2
* d2l-colors#^3.1.2
typography version 6.1.3
### Dependencies
* polymer#1 - 2
* d2l-colors#^3.1.2
typography version 6.1.4
### Dependencies
* polymer#1 - 2
* d2l-colors#^3.1.2