# hairline

> CSS retina hairline

Latest version **1.0.0** (published 2019-05-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install hairline
pnpm add hairline
yarn add hairline
bun add hairline
```

## 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.0 |
| Published | 2019-05-07 |
| First published | 2019-05-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 10.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Sun |
| Maintainers | ufologist |
| Keywords | retina, hairline, 1px |

## Links

- npm: https://www.npmjs.com/package/hairline
- Repository: https://github.com/ufologist/hairline
- Homepage: https://github.com/ufologist/hairline#readme
- Issues: https://github.com/ufologist/hairline/issues
- npm.io page: https://npm.io/package/hairline

## Recent versions

- 1.0.0 (latest) — 2019-05-07

## README

# hairline

[![NPM version][npm-image]][npm-url] [![changelog][changelog-image]][changelog-url] [![license][license-image]][license-url]

[npm-image]: https://img.shields.io/npm/v/hairline.svg?style=flat-square
[npm-url]: https://npmjs.org/package/hairline
[license-image]: https://img.shields.io/github/license/ufologist/hairline.svg
[license-url]: https://github.com/ufologist/hairline/blob/master/LICENSE
[changelog-image]: https://img.shields.io/badge/CHANGE-LOG-blue.svg?style=flat-square
[changelog-url]: https://github.com/ufologist/hairline/blob/master/CHANGELOG.md

[![npm-image](https://nodei.co/npm/hairline.png?downloads=true&downloadRank=true&stars=true)](https://npmjs.com/package/hairline)

极细的线

## Usage

### Usage1: npm

1. install

   ```
   npm install hairline --save
   ```
2. import
   
   ```javascript
   import 'hairline';
   ```
3. use

   ```html
   <div class="hairline hairline--round">hairline</div>
   ```

### Usage2: Download

1. download [`hairline.css`](https://github.com/ufologist/hairline/blob/master/src/hairline.css)
2. link css

   ```html
   <link rel="stylesheet" href="path/to/hairline.css">
   ```
3. use

   ```html
   <div class="hairline hairline--round">hairline</div>
   ```

## APIDoc

| Class               | Description      |
|---------------------|------------------|
| `.hairline`         | base class |
| `.hairline--round`  | round hairline border      |
| `.hairline--top`    | top hairline border      |
| `.hairline--right`  | right hairline border      |
| `.hairline--bottom` | bottom hairline border      |
| `.hairline--left`   | left hairline border      |
| `.hairline--input`  | input/textarea element hairline border      |

## 其他实现

* [postcss-retina](https://github.com/Ziphwy/postcss-retina)
* [Hairlines | Framework7](https://framework7.io/docs/hairlines.html)
* [blear.scss.hairline](https://github.com/blearjs/blear.scss.hairline)
* [border-retina](https://github.com/AlanZou007/air-css/blob/master/src/mixins/border-retina.css)
* [border-1px.less](https://github.com/goddancer/npm/tree/master/border-1px.less)
* [border.less](https://github.com/yangyuji/border.less)
* [webkit-sassui-hairline](https://github.com/afeiship/webkit-sassui-hairline)
* [Hairline border](https://30-seconds.github.io/30-seconds-of-css/#hairline-border)
* [retina-border](https://github.com/wind-stone/retina-border)

## 参考

* [Retina屏的移动设备如何实现真正1px的线？](https://jinlong.github.io/2015/05/24/css-retina-hairlines/)
* [CSS retina hairline, the easy way](http://dieulot.net/css-retina-hairline)

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