# `MishkaCmsCore.Runtime.Resources.Changes.StylesheetCompiles`
[🔗](https://github.com/mishka-group/mishka_cms_core/blob/v0.0.5-alpha.5/lib/mishka_cms_core/runtime/resources/__changes/stylesheet_compiles.ex#L5)

Refuses a stylesheet whose CSS Tailwind will not build, on its `content` field, in Tailwind's own
words: `MishkaCmsCore.Runtime.Compilers.TailwindCompiler.verify_css/2`, the check the builder's
reusable classes are written through.

Every row is pasted into the input Tailwind builds a site's CSS from, so one row it refuses (an
unclosed `{`, an `@apply` of a utility it does not know) fails that whole build, and the site
keeps the CSS it had before for every later change too. The save said it was updated.

Asked when `content` changes, in a `before_transaction` hook: it runs the Tailwind binary, about
1.5 s, so it waits for the write rather than running on a form's every keystroke, and it is done
before the write's transaction opens, so no database connection is held while Tailwind runs. The
builder's own rows (`page_code: :builder`) are left to the builder, which checks each class and
each element's CSS before it writes the row.

    changes do
      change {MishkaCmsCore.Runtime.Resources.Changes.StylesheetCompiles, []},
        on: [:create, :update]
    end

---

*Consult [api-reference.md](api-reference.md) for complete listing*
