# @mobly/ui-styles

> Styles in (s)css for Mobly

Latest version **1.0.1** (published 2020-08-02) · ISC license · 0 weekly downloads

## Install

```sh
npm install @mobly/ui-styles
pnpm add @mobly/ui-styles
yarn add @mobly/ui-styles
bun add @mobly/ui-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.0.1 |
| Published | 2020-08-02 |
| First published | 2020-07-27 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 1.6 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Andry Charlier |
| Maintainers | andrych, mobly-dev |
| Keywords | Mobly, Styles, sass, scss, css, tailwindcss, storybook |

## Links

- npm: https://www.npmjs.com/package/@mobly/ui-styles
- npm.io page: https://npm.io/package/@mobly/ui-styles

## Dependencies (1)

- [normalize.css](https://npm.io/package/normalize.css.md) 8.0.1

## Recent versions

- 1.0.1 (latest) — 2020-08-02
- 1.0.0 — 2020-07-29
- 1.0.0-alpha.0 — 2020-07-27

## README

# @mobly/ui-styles

Mobly UI styles.

## Install

Install dependencies:

```shell
npm i @mobly/ui-styles
```

## Usage

This package is built with [Sass](https://sass-lang.com/) and [tailwindcss](https://tailwindcss.com/).

```css
/* This will import the main.css file */
@import '@mobly/ui-styles';

/* For more granular imports we also provide */
@import '@mobly/ui-styles/build/css/fonts.css';
@import '@mobly/ui-styles/build/css/base.css';
@import '@mobly/ui-styles/build/css/components.css';
@import '@mobly/ui-styles/build/css/utils.css';
```

We also exported our custom tailwindcss config for referencing it in JavaScript

```javascript
import config from '@mobly/ui-styles/config';

config.theme.screens.xs
// returns '320px'
```

## API

* Base
* Components:
	* `.c-button`
	* `.c-checkbox`
	* `.c-datepicker`
	* `.c-icon`
	* `.c-input`
	* `.c-loader`
	* `.c-modal`
	* `.c-radio`
	* `.c-select`
	* `.c-switch`
* Utils:
	* `.u-container`

### Tailwindcss

Checkout our [`tailwind.config.js`](../../tailwind.config.js) for all the custom changes

* Prefix: `.u-`
* Theme changes:
	* Screens: custom
	* Colors: custom
	* Border color: added `.u-border-default`
	* Box shadow: custom
	* Font family: custom
	* Font size: custom
	* Line height: custom
	* Max width: custom
	* Text color: added `.u-text-color`
	* Z-index: custom
* Disabled plugins:
	* container

For more info on all tailwindcss' utility classes, check out their docs.

## Development

Builds are setup with webpack, check the [`webpack.config.js`](./webpack.config.js) for more info.  
We use [storybook](https://github.com/storybookjs/storybook) for developping our styles.

### NPM scripts

| Command         | Description                                                | Runs
| --------------- | ---------------------------------------------------------- | -----------
| start           | Start up storybook                                         | `start-storybook -p 6006 -s ../../storybook/static`
| build           | Build package contents                                     | `webpack`
| build:storybook | Build storybook styleguide                                 | `build-storybook`
| lint            | Lint scss files                                             | `stylelint ./src/scss --cache --syntax scss`
| prepublishOnly  | Runs before every `npm run publish` (!important for lerna) | `npm run lint && npm run build`

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