# bud-wp-editor-query

> Extract WordPress editor styles and split into another stylesheet using specialised media queries

Latest version **0.0.4** (published 2023-09-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install bud-wp-editor-query
pnpm add bud-wp-editor-query
yarn add bud-wp-editor-query
bun add bud-wp-editor-query
```

## Health

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

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.4 |
| Published | 2023-09-13 |
| First published | 2023-09-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 15.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 13 |
| Maintainers | conduitinnovaton |

## Links

- npm: https://www.npmjs.com/package/bud-wp-editor-query
- Repository: https://github.com/talss89/bud-wp-editor-query
- Homepage: https://github.com/talss89/bud-wp-editor-query#readme
- Issues: https://github.com/talss89/bud-wp-editor-query/issues
- npm.io page: https://npm.io/package/bud-wp-editor-query

## Dependencies (1)

- [css-mediaquery](https://npm.io/package/css-mediaquery.md) ^0.1.2

## Recent versions

- 0.0.4 (latest) — 2023-09-13
- 0.0.3 — 2023-09-12
- 0.0.2 — 2023-09-12
- 0.0.1 — 2023-09-11

## README

# bud-wp-editor-query

Extracts wp-editor styles into a separate stylesheet. For WordPress FSE themes. A rewrite of the now defunct https://github.com/talss89/wp-editor-query-plugin

Thanks to [@kellymears](https://github.com/kellymears) and [@strarsis](https://github.com/strarsis) for their help on this.

This is based off the refactor and suggestions that [@kellymears made in this PR](https://github.com/talss89/wp-editor-query-plugin/pull/2).

## Install

`npm install bud-wp-editor-query --save-dev` or `yarn add bud-wp-editor-query -D`

## How to use

That's it. Install it. Editor stylesheet will be at `./dist/editor/<module>.css`

## Syntax

```css
@media all, (wp-editor) {
  /* Style is in both main and editor CSS */

  .your-styles-here {
    color: blue;
  }
}

@media (wp-editor) {
  /* Style is ONLY in editor CSS */

  .your-styles-here {
    color: blue;
  }
}

/* Nesting is OK... */

@media (wp-editor) {
  @media screen and (min-width: 1024px) {
    .your-style-here {
      width: 50%;
    }
  }
}

/* Non standard bubble-up... */

.parent {
  color: red;

  @media (wp-editor) {
    color: blue;
  }
}
```

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