# App.css is not added to editor when 'yarn dev' is runnig

**URL:** https://discourse.roots.io/t/app-css-is-not-added-to-editor-when-yarn-dev-is-runnig/27157
**Category:** bud
**Tags:** fse, sage10
**Created:** 2024-05-14T17:21:36Z
**Posts:** 1

## Post 1 by @Kit — 2024-05-14T17:21:36Z

I’ve managed to load `app.css` into the editor base on this post:

> [@How to use compiled css within add_editor_style();](https://discourse.roots.io/t/how-to-use-compiled-css-within-add-editor-style/24945):
>
> Hello, I’m using the classic editor, and I’d like to use the compiled editor.css to reflect the styling on the front end. The issue I have is passing the compiled asset into add\_editor\_style() I’ve added the following to setup.php, but it doesn’t work. add\_action( 'admin\_init', function () { add\_editor\_style( \Roots\asset('editor') ); }); The only way I can get it to work is to add the full path, but that obviously stops working each time I rebuild the assets. add\_action( 'admin\_init', fu…

The style is applied to both editor and front-end after I run `yarn build`. However, when I run `yarn dev`, the style is only applied to front-end until I run `yarn build` again. Presumably, it’s a issue related to how the hot-reload script injects the CSS?

Is there a way to apply the css when I am running `yarn dev`?

Other than enabling FSE, the following is the only piece of code added to `setup.php`

```
add_action('after_setup_theme', function () {
    add_theme_support('editor-styles');
    $relAppCssPath = asset('app.css')->relativePath(get_theme_file_path());
    add_editor_style($relAppCssPath);
});
```

`app.css` I used for testing

```
* {
  @apply border border-red-500;
}
```
