https://github.com/suitcss/utils-text
CSS text utilities
https://github.com/suitcss/utils-text
Last synced: over 1 year ago
JSON representation
CSS text utilities
- Host: GitHub
- URL: https://github.com/suitcss/utils-text
- Owner: suitcss
- License: mit
- Created: 2013-03-03T09:52:54.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2016-10-15T15:42:10.000Z (over 9 years ago)
- Last Synced: 2025-02-17T11:01:51.782Z (over 1 year ago)
- Language: HTML
- Homepage: http://suitcss.github.io/utils-text/test/
- Size: 45.9 KB
- Stars: 23
- Watchers: 11
- Forks: 13
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
# SUIT CSS utilities: text
[](http://travis-ci.org/suitcss/utils-text)
SUIT CSS text utilities.
Read more about [SUIT CSS's design principles](https://github.com/suitcss/suit/).
## Installation
* [npm](http://npmjs.org/): `npm install suitcss-utils-text`
* Download: [zip](https://github.com/suitcss/utils-text/releases/latest)
## Available classes
* `u-textBreak` - Break strings when their length exceeds the width of their container.
* `u-textCenter` - Center-align text.
* `u-textLeft` - Left-align text.
* `u-textRight` - Right-align text.
* `u-textInheritColor` - Inherit the ancestor's text color.
* `u-textKern` - Enable kerning in supporting browsers.
* `u-textNoWrap` - Prevent wrapping at whitespace.
* `u-textTruncate` - Truncate a single line of text, with ellipsis.
## Usage
Please refer to the README for [SUIT CSS utils](https://github.com/suitcss/utils/)
## Testing
Install [Node](http://nodejs.org) (comes with npm).
```
npm install
```
To generate a build:
```
npm run build
```
To lint code with [postcss-bem-linter](https://github.com/postcss/postcss-bem-linter) and [stylelint](http://stylelint.io/)
```
npm run lint
```
To generate the testing build.
```
npm run build-test
```
To watch the files for making changes to test:
```
npm run watch
```
Basic visual tests are in `test/index.html`.
## Browser support
* Google Chrome (latest)
* Opera (latest)
* Firefox (latest)
* Safari 5+
* Internet Explorer 8+