Drupal theme css not updating Hotflirt nl

Posted by / 04-Mar-2017 17:55

Drupal theme css not updating

In some cases, you do not need your library to be active for all pages, but just a subset of pages.For example, you might need your library to be active only when a certain block is being shown, or when a certain node type is being displayed.(Note that dependencies need a dash (-) before the library name) The order in which assets will be loaded depends of the order that we specify them in the library declaration.In Drupal 7, we used to be able to specify the media property ( Depending on which assets we need to have loaded, we’ll want to attach the corresponding asset library in a different way.After all, some asset libraries are needed on all pages, others only very rarely, and yet others on most, but not quite all.To attach a library to all the pages on the site that use our theme, we need to declare it in our theme’s *yml file, under the libraries key: We can list as many libraries as we want, all of them will be loaded on every page.

This guide contains information that applies to Drupal 8 and refers sometimes to Drupal 7 in order to explain new concepts and approaches.To define one or more libraries, add a *.file to your theme folder.(If your theme is named my_theme, then the file name should be my_theme.libraries.yml).Each “library” in the file is an entry detailing CSS and JS files (assets), like this: and that is what we defined in dependencies.You can add more css files, javascript files and dependencies just writing them under in the right place.

drupal theme css not updating-41drupal theme css not updating-52drupal theme css not updating-2

This series is a collection of all of our Drupal 8 Theming tutorials -- everything you need to know to create amazing Drupal 8 themes.

One thought on “drupal theme css not updating”