A Compony-theme looks a lot like any other Drupal 8 theme, let's first cover the files that are default in a Drupal 8 theme.
This is the default
.theme file. If you open this file, you will see a few functions that make the internals of Compony work. A
.theme file contains PHP to adapt Drupal’s theming layer. The things we as Frontenders do in PHP is usually minimal and there is a lot of repetition of the things that we could do.
This is a default
my-theme.libraries.yml will define the libraries of
components folder is a convention in Compony. It introduces the main concept of theming with a Compony-theme: a theme is a collection of components.
This means that all HTML, CSS, JS, yaml and PHP, inside a theme, belong to a component. And if something belongs to a component, it should go in to this folder.
Prepare to have this folder always open, as all the theming work will go in here.
_sass_essentials is a helper-folder that defines global sass-variables to be used in components. If you want to read more about how Sass is used, please skip to the