# query-declaration

> A pure-javascript CSS selector engine using CSS declarations for querying.

Latest version **1.0.6** (published 2015-08-26) · ISC license · 0 weekly downloads

## Install

```sh
npm install query-declaration
pnpm add query-declaration
yarn add query-declaration
bun add query-declaration
```

## 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.6 |
| Published | 2015-08-26 |
| First published | 2015-08-10 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Mike Costello |
| Maintainers | mikecostello |
| Keywords | css selector dom style queryselectorall getComputedStyle jquery plugin scraper |

## Links

- npm: https://www.npmjs.com/package/query-declaration
- Repository: http://github.com/MikeCostello/query-declaration
- Homepage: https://github.com/MikeCostello/query-declaration
- Issues: https://github.com/MikeCostello/query-declaration/issues
- npm.io page: https://npm.io/package/query-declaration

## Alternatives

- [@tsparticles/shape-image](https://npm.io/package/@tsparticles/shape-image.md) — 303.7K weekly downloads
- [@tsparticles/shape-line](https://npm.io/package/@tsparticles/shape-line.md) — 233.7K weekly downloads
- [stringify-attributes](https://npm.io/package/stringify-attributes.md) — 58.6K weekly downloads
- [mobile-drag-drop](https://npm.io/package/mobile-drag-drop.md) — 46.3K weekly downloads
- [@comunica/actor-rdf-parse-html](https://npm.io/package/@comunica/actor-rdf-parse-html.md) — 29.2K weekly downloads

## Recent versions

- 1.0.6 (latest) — 2015-08-26
- 1.0.5 — 2015-08-18
- 1.0.4 — 2015-08-12
- 1.0.3 — 2015-08-11
- 1.0.2 — 2015-08-10
- 1.0.1 — 2015-08-10
- 1.0.0 — 2015-08-10

## README

# queryDeclarationAll()

A pure-javascript CSS selector engine using CSS declarations for querying. Allowing the selection of elements by how they're styled.

[Demo](http://mikecostello.github.io/query-declaration)

## Install Options
* Download [query-declaration.js](https://raw.githubusercontent.com/MikeCostello/query-declaration/master/dist/query-declaration.min.js) for use in `<script>` tag.
* jQuery plugin [jquery-selector-style.js](https://raw.githubusercontent.com/MikeCostello/query-declaration/master/dist/jquery-selector-style.min.js)
* `npm install query-declaration`
* `bower install query-declaration`

## Build
```
git clone git@github.com:MikeCostello/query-declaration.git
npm install
npm install -g webpack
npm run build
```

#### Optional
```
npm run docs
```

## Documentation

`queryDeclarationAll(css [,context])`

**css**  
A CSS declaration block to match DOM Elements' computed styles against.  
*Type:* String or PlainObject

**context**  
The DOM Elements used when validating the CSS rules.  
*Type*: CSS Selector String, DOM Element or Array of DOM Elements.  
*Default:* `"*"`

#### jQuery Selector
`$(":style(css)")`

**css**  
A CSS declaration block to match jQuery Elements' styles against.  
*Type:* String or PlainObject


### Examples
```
// Select red paragraphs
queryDeclarationAll({ color: "red" }, "p")

// Select images wider than 200px
queryDeclarationAll("{ width: >200px }", "img")

// Select images smaller than 100px using jQuery
$("img:style({ width: <100px })")
```

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