# fit-parent-to-child

> Force a specified HTML element to have the same height as a child element.

Latest version **1.0.1** (published 2017-01-07) · ISC license · 0 weekly downloads

## Install

```sh
npm install fit-parent-to-child
pnpm add fit-parent-to-child
yarn add fit-parent-to-child
bun add fit-parent-to-child
```

## 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 | 2017-01-07 |
| First published | 2017-01-05 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | John Watkins |
| Maintainers | johnwatkins0 |

## Links

- npm: https://www.npmjs.com/package/fit-parent-to-child
- Repository: https://github.com/ColbyCommunications/fit-parent-to-child
- Homepage: https://github.com/jwatkins0/fit-parent-to-child#readme
- Issues: https://github.com/jwatkins0/fit-parent-to-child/issues
- npm.io page: https://npm.io/package/fit-parent-to-child

## Dependencies (2)

- [lodash](https://npm.io/package/lodash.md) ^4.17.4
- [babel-preset-stage-1](https://npm.io/package/babel-preset-stage-1.md) ^6.16.0

## Recent versions

- 1.0.1 (latest) — 2017-01-07
- 1.0.0 — 2017-01-07
- 0.0.17 — 2017-01-07
- 0.0.16 — 2017-01-07
- 0.0.15 — 2017-01-07
- 0.0.14 — 2017-01-07
- 0.0.13 — 2017-01-07
- 0.0.12 — 2017-01-07
- 0.0.11 — 2017-01-07
- 0.0.10 — 2017-01-07
- 0.0.9 — 2017-01-07
- 0.0.8 — 2017-01-07
- 0.0.7 — 2017-01-07
- 0.0.6 — 2017-01-07
- 0.0.5 — 2017-01-07
- … 4 more at https://npm.io/package/fit-parent-to-child/versions

## README

## Dynamically set the height of an HTML element to that of a child element.

### Installation

```
npm install --save fit-parent-to-child
```

### Usage

```js
import fitParentToChild from 'fit-parent-to-child';

window.addEventListener('load', () => fitParentToChild({
  parentSelector: '.parentElement',
  childSelector: '.childSelector'
}));
```

#### The Settings Object.

The fitParentToChild function takes a single object with two required parameters:

1. `parentSelector`: Any valid CSS selector.
2. `childSelector`: Any valid CSS selector. If the child is not inside the parent, nothing will happen.

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