Skip to main content
3 of 3
Commonmark migration

My custom CSS is not taken into account

I add a CSS file (mymovies.css) to a custom form (SeenMovies) in a custom module (eric) with this code I inserted at the end of buildForm

$form['#attached']['library'][] = 'eric/mymovies';

and this code in eric.libraries.yml

mymovies:
  version: 1.x
  css:
    theme:
      css/mymovies.css: {}

But my css doesn't override bootstrap.min.css as you can see in Firefox inspector:
enter image description here

How can I fix that?

gbmapo
  • 1.1k
  • 17
  • 45