barnettech / drupal8_book

4 stars 17 forks source link

Notes on "Adding CSS to your Drupal Module" chapter #7

Open kwaight3 opened 8 years ago

kwaight3 commented 8 years ago

The "Adding CSS to your Drupal Module" chapter is short but resolved an important problem for me -- thanks!. Just a couple of comments:

  1. When I followed the instructions to try to link to a CSS library in my own pre-existing module, it didn't seem to work; the web page didn't change, as if there were no CSS file. After a lot of experimentation, I finally found by accident that it started working when I reset the Drupal cache, or at least I think that's what happened.
  2. It's a small thing, but I found it confusing that your module was hello_world and the CSS file was hello_world.css (with underscores), but the libraries.yml file used hello-world (with a hyphen). At first I thought that the library element in the render array, "hello_world/hello-world" was a typo.
barnettech commented 8 years ago

Thanks I will be sure to clarify this is the next version....

Sent from my iPhone

On May 30, 2016, at 2:49 PM, kwaight3 notifications@github.com wrote:

The "Adding CSS to your Drupal Module Chapter" is short but resolved an important problem for me -- thanks!. Just a couple of comments:

When I followed the instructions to try to link to a CSS library in my own pre-existing module, it didn't seem to work; the web page didn't change, as if there were no CSS file. After a lot of experimentation, I finally found by accident that it started working when I reset the Drupal cache, or at least I think that's what happened.

It's a small thing, but I found it confusing that your module was hello_world and the CSS file was hello_world.css (with underscores), but the libraries.yml file used hello-world (with a hyphen). At first I thought that the library element in the render array, "hello_world/hello-world" was a typo.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.