https://github.com/suitcss/components-test
Component CSS to help test the visual presentation of components
https://github.com/suitcss/components-test
Last synced: 7 months ago
JSON representation
Component CSS to help test the visual presentation of components
- Host: GitHub
- URL: https://github.com/suitcss/components-test
- Owner: suitcss
- License: mit
- Created: 2013-10-19T10:57:05.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2016-10-15T15:38:29.000Z (over 9 years ago)
- Last Synced: 2025-04-05T22:51:15.066Z (about 1 year ago)
- Language: CSS
- Homepage: http://suitcss.github.io/components-test/test/
- Size: 22.5 KB
- Stars: 19
- Watchers: 8
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
# SUIT CSS components-test
[](https://travis-ci.org/suitcss/components-test)
CSS to help test the visual presentation of components.
Read more about [SUIT CSS](https://github.com/suitcss/suit/).
## Installation
* [npm](https://www.npmjs.org/package/suitcss-components-test): `npm install suitcss-components-test`
* Download: [zip](https://github.com/suitcss/components-test/releases/latest)
## Available classes
* `Test` - The core component class
* `Test-title` - The test title
* `Test-describe` - Describes a component configuration
* `Test-it` - Describes an expected outcome of a configuration
* `Test-run` - A specific context within which the component is tested
## Usage
This is an example of an idiomatic SUIT CSS test file:
```html
ComponentName [component] - SUIT CSS
#textWrapping {
width: 300px;
}
#modifier-textWrapping {
width: 300px;
}
SUIT CSS: ComponentName component tests
.ComponentName
renders
prevents text wrapping
.ComponentName--modifier
renders larger
allows text wrapping
```
## 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 4+
* Safari 5+
* Internet Explorer 8+