Giter Site home page Giter Site logo

oleersoy / components-test Goto Github PK

View Code? Open in Web Editor NEW

This project forked from suitcss/components-test

0.0 1.0 0.0 101 KB

Component CSS to help test the visual presentation of components

Home Page: http://suitcss.github.io/components-test/test/

License: MIT License

CSS 52.84% HTML 47.16%

components-test's Introduction

SUIT CSS components-test

Build Status

CSS to help test the visual presentation of components.

Read more about SUIT CSS.

Installation

  • npm: npm install suitcss-components-test
  • Download: zip

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:

<!DOCTYPE html>
<meta charset="utf-8">
<title>ComponentName [component] - SUIT CSS</title>
<meta name="viewport" content="initial-scale=1,width=device-width">
<link rel="stylesheet" href="../build/test.css">
<style>
  #textWrapping {
    width: 300px;
  }

  #modifier-textWrapping {
    width: 300px;
  }
</style>

<div class="Test">
  <h1 class="Test-title">SUIT CSS: <a href="https://github.com/repo/component-name">ComponentName</a> component tests</h1>

  <h2 class="Test-describe">.ComponentName</h2>
  <h3 class="Test-it">renders</h3>
  <div class="Test-run" id="renders">
    <!-- component configuration 1 -->
  </div>
  <h3 class="Test-it">prevents text wrapping</h3>
  <div class="Test-run" id="textWrapping">
    <!-- component configuration 1 -->
  </div>

  <h2 class="Test-describe">.ComponentName--modifier</h2>
  <h3 class="Test-it">renders larger</h3>
  <div class="Test-run" id="modifier-larger">
    <!-- component configuration 2 -->
  </div>
  <h3 class="Test-it">allows text wrapping</h3>
  <div class="Test-run" id="modifier-textWrapping">
    <!-- component configuration 2 -->
  </div>
</div>

Testing

Install Node (comes with npm).

npm install

To generate a build:

npm run build

To generate the testing build.

npm run build-test

Basic visual tests are in test/index.html.

Browser support

  • Google Chrome (latest)
  • Opera (latest)
  • Firefox 4+
  • Safari 5+
  • Internet Explorer 8+

components-test's People

Contributors

necolas avatar oleersoy avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.