# table-styles

> Styles Repository === The styles repository includes both styles and react components.

Latest version **1.1.7** (published 2016-07-02) · ISC license · 0 weekly downloads

## Install

```sh
npm install table-styles
pnpm add table-styles
yarn add table-styles
bun add table-styles
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.7 |
| Published | 2016-07-02 |
| First published | 2016-07-02 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 22 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | haleyt |

## Links

- npm: https://www.npmjs.com/package/table-styles
- npm.io page: https://npm.io/package/table-styles

## Dependencies (22)

- [react](https://npm.io/package/react.md) ^15.1.0
- [express](https://npm.io/package/express.md) ^4.13.4
- [babelify](https://npm.io/package/babelify.md) ^7.3.0
- [bluebird](https://npm.io/package/bluebird.md) ^3.4.0
- [babel-cli](https://npm.io/package/babel-cli.md) ^6.10.1
- [react-dom](https://npm.io/package/react-dom.md) ^15.1.0
- [browserify](https://npm.io/package/browserify.md) ^13.0.1
- [express-less](https://npm.io/package/express-less.md) 0.0.8
- [babel-register](https://npm.io/package/babel-register.md) ^6.9.0
- [normalize.less](https://npm.io/package/normalize.less.md) ^1.0.0
- [react-overlays](https://npm.io/package/react-overlays.md) ^0.6.0
- [babel-preset-node6](https://npm.io/package/babel-preset-node6.md) ^11.0.0
- [babel-preset-react](https://npm.io/package/babel-preset-react.md) ^6.5.0
- [babel-preset-es2015](https://npm.io/package/babel-preset-es2015.md) ^6.9.0
- [less-plugin-clean-css](https://npm.io/package/less-plugin-clean-css.md) ^1.5.1
- [less-plugin-autoprefix](https://npm.io/package/less-plugin-autoprefix.md) ^1.5.1
- [express-babelify-middleware](https://npm.io/package/express-babelify-middleware.md) ^0.2.1
- [babel-preset-async-to-bluebird](https://npm.io/package/babel-preset-async-to-bluebird.md) ^1.1.0
- [babel-plugin-transform-function-bind](https://npm.io/package/babel-plugin-transform-function-bind.md) ^6.8.0
- [babel-plugin-transform-class-properties](https://npm.io/package/babel-plugin-transform-class-properties.md) ^6.9.1
- [babel-plugin-transform-decorators-legacy](https://npm.io/package/babel-plugin-transform-decorators-legacy.md) ^1.3.4
- [babel-plugin-transform-async-to-generator](https://npm.io/package/babel-plugin-transform-async-to-generator.md) ^6.8.0

## Recent versions

- 1.1.7 (latest) — 2016-07-02

## README

Styles Repository
===
The styles repository includes both styles and react components.

Usage
---

__First install__
`npm i --save https://github.com/TableCo/styles.git`


__Use as Middleware__

```javascript
// server.js
import {tableStyles} from 'table-styles'
import express from 'express'
const app = express()
const production = false

app.use(tableStyles(production))

app.listen(process.env.PORT || 5000)
```

__Use Css Compiled Styles__
```html
<!-- development index.html -->
<head>
  <link rel="stylesheet" href="https://rawgit.com/TableCo/styles/gh-pages/styles/table-styles.css"/>
</head>

<!-- production index.html -->
<head>
  <link rel="stylesheet" href="https://cdn.rawgit.com/TableCo/styles/gh-pages/styles/table-styles.css"/>
</head>
```
__Use Less Styles__

we will find a better way to do this
```javascript
// server.js
import serve from 'koa-static'

app.use(serve('node_modules/table-styles'))
```

```css
/* example.less */
@import "colors.less";

.example {
  color: @color--gray;
}
```

__Import Components__
```javascript
import React, {Component} from 'react'
import {NavBar} from 'table-styles'

export class App extends Component {
  render () {
    return <div>
      <NavBar/>
      // ...
    </div>
  }
}
```

Development
---

__Run Locally__

in terminal type `npm install` then `npm start`

in browser go to `localhost:1234/example/main`

### Jade
We use Jade for displaying the style examples
 * [Jade Reference](http://jade-lang.com/reference/)

Styles
---
Each style is defined by a style sheet.

- typography/fonts
- icons
- buttons
- forms/inputs
- lists/tables
- list-items
- badges
- colors
- cards

### Less
We are using less as a precompiler for our css.
 * [Getting Started with less](http://lesscss.org/)
 * [Features](http://lesscss.org/features)


### BEM
We use BEM (Block Element Modifier)
 - *block*__*element-of-block*
 - *block*--*modifier*

For example

```less
// Block element
.profile {}

// Element of block profile
.profile__background {}

// Modifier to profile element for card
.profile--card {}
```

For variables use only dashes
 - *namespace*--*variable-name*

```less
@font-size--header-lg: 30px;
@color--white: #000;

```

**Resources**
 * [Get BEM](http://getbem.com/introduction/)
 * [CSS Tricks](https://css-tricks.com/bem-101/)
 * [BEM.info](https://en.bem.info/method/) (_not highly recomended_)


Components
---
Each component is a stand alone react component.
- nav-bar
- dropdowns
- tooltips
- loaders
- progress
- modals
- notification
- profile, table, project
  - list-item
  - card
- profile-header
- media viewer
- microapp shared components

Potential Components
- chips
- message
- messenger

### ES6
We are using the ES6 version of Javascript.
 * [ES6 Features](http://es6-features.org/#Constants)

### StandardJS
We are using StandardJS to define our Javascript style.
* [StandardJS Rules](http://standardjs.com/rules.html)
* [StandardJS Home](http://standardjs.com/index.html)

---
_Source: https://npm.io/package/table-styles · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
