• Resolved almcr

    (@almcr)


    Gutenberg can generate up to 2 files to be used as input with CSS code: style.css and theme.css.

    Using Gutenberg (no plugin), 2 minimized files, style.min.css and theme.min.css are used and can be found at: wp-includes/css/dist/block-library/, the un-minimized files: style.css and theme.css are also found here.

    Using the Gutenberg plugin, the 2 files, style.css and theme.css are used and can be found at: wp-content/plugins/gutenberg/build/block-library/.

    This means that there are 3 versions of each of these files. None of them are the same, the code differs between all of them.

    Why does this code differ file to file? If you are using the Gutenberg plugin, you may be using different CSS code than the production Gutenberg, and differences may appear on your pages because of this.

    Al

    • This topic was modified 6 years, 5 months ago by almcr.
Viewing 1 replies (of 1 total)
  • Plugin Author Greg Ziółkowski

    (@gziolo)

    Hello @almcr!

    Gutenberg can generate up to 2 files to be used as input with CSS code: style.css and theme.css.

    In fact, it can be up to 3 types of files. There is also editor.css which gets loaded only in the editor. It’s explained a bit more in https://developer.wordpress.org/block-editor/tutorials/block-tutorial/applying-styles-with-stylesheets/.

    Why does this code differ file to file? If you are using the Gutenberg plugin, you may be using different CSS code than the production Gutenberg, and differences may appear on your pages because of this.

    WordPress core keeps its version of styles in wp-includes/css/dist/block-library/ and they are used when the plugin is not installed. By default, the minified version of files will be served unless you enabled the debug mode for your site. Those styles are the same, the only difference is that files are human-readable when in the debug mode.

    When you install the Gutenberg plugin, then the same styles are overridden with those located in wp-content/plugins/gutenberg/build/block-library/. They will differ because the Gutenberg plugin is in active development so it gets new updates faster than they can land in WordPress core.

    I hope that it makes it all clear.

    Thanks for asking.

Viewing 1 replies (of 1 total)

The topic ‘Input CSS Code’ is closed to new replies.