An open API service indexing awesome lists of open source software.

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

Awesome Lists containing this project

README

          

# SUIT CSS components-test

[![Build Status](https://travis-ci.org/suitcss/components-test.svg?branch=master)](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+