# tree-flag

> Similar in appearance to the media object, but which provides slightly more advanced functionality.

Latest version **0.2.0** (published 2015-04-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install tree-flag
pnpm add tree-flag
yarn add tree-flag
bun add tree-flag
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.0 |
| Published | 2015-04-27 |
| First published | 2015-02-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Ilia Kolev |
| Maintainers | iliakolev |
| Keywords | css, oocss |

## Links

- npm: https://www.npmjs.com/package/tree-flag
- Repository: https://github.com/treeframework/object.flag
- Issues: https://github.com/treeframework/object.flag/issues
- npm.io page: https://npm.io/package/tree-flag

## Dependencies (2)

- [tree-defaults](https://npm.io/package/tree-defaults.md) ~0.2.5
- [tree-functions](https://npm.io/package/tree-functions.md) ~0.2.5

## Alternatives

- [style-dictionary](https://npm.io/package/style-dictionary.md) — 2.0M weekly downloads
- [postcss-merge-idents](https://npm.io/package/postcss-merge-idents.md) — 1.7M weekly downloads
- [@fontsource/noto-sans](https://npm.io/package/@fontsource/noto-sans.md) — 93.0K weekly downloads
- [uglifycss](https://npm.io/package/uglifycss.md) — 71.6K weekly downloads
- [mat4-interpolate](https://npm.io/package/mat4-interpolate.md) — 23.3K weekly downloads

## Recent versions

- 0.2.0 (latest) — 2015-04-27
- 0.1.9 — 2015-02-08

## README

# Flag

The `flag` object module is an object similar in appearance to
[the media object](https://github.com/treeframework/object.media), but which
provides slightly more advanced functionality.

## Dependencies

The `flag` object depends on two other modules:

* [settings.defaults](https://github.com/treeframework/settings.defaults)
* [tools.functions](https://github.com/treeframework/tools.functions)

If you install the `flag` object using Bower or npm, you will get these 
dependencies at the same time. If not using Bower or npm, please be sure to 
install and `@import` these dependencies in the relevant way.

## Instalation

You can install the `flag` module via Bower, npm, or copy and paste.

### Install using Bower:

```sh
$ bower install tree-flag --save
```

Once installed, `@import` into your project in its Objects layer:

```scss
@import "bower_components/tree-flag/object.flag";
```

### Install using npm:

```sh
$ npm install tree-flag --save
```

### Install via file download

The least recommended option for installation is to simply download
`_object.flag.scss` into your project and `@import` it into your project in
its Objects layer.

## Usage

Basic usage of the `flag` object uses the required classes:

```html
<div class="o-flag">
    <div class="o-flag__img">
        <img class="o-flag__img" src="/path/to/image.png" alt="" />
    </div>
    <div class="o-flag__body">
        <p>Text-like content goes here.<p>
    </div>
</div>
```

The only valid children of the `.o-flag` node are `.o-flag__img` and 
`.o-flag__body`.

## Options

Other, optional classes can supplement the required base classes:

* `.o-flag--[tiny|small|large|huge]`: alter the spacing between the image- and
  text-content.
* `.o-flag--rev`: reversed flag objects have their image-content to the right,
  and text-content to the left.
* `.o-flag--flush`: no space between image- and text-content.
* `.o-flag--[top|bottom]`: align object to top or bottom.
* `.o-flag--responsive`: a very basic responsive implementation of the flag object.

For example:

```html
<div class="o-flag  o-flag--flush">
    <div class="o-flag__img">
        <img class="o-flag__img" src="/path/to/image.png" alt="" />
    </div>
    <div class="o-flag__body">
        <p>Text-like content goes here.<p>
    </div>
</div>
```

## Credits

* **[inuitcss](https://github.com/inuitcss)** Powerful, Sass-based, OOCSS
framework designed with scalability and performance in mind.

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