I have installed Forty Two for Drupal 8 and noticed the following in libraries.yml of STARTERKIT:

main:
  version: VERSION
  css:
    base:
      static/css/main.css: {}
  js:
      static/js/main.js: {}

While there is static/js/main.js in the STARTERKIT, static/css/main.css is not available.

Is this just the CSS file for own customizations and one should just create this file in the subtheme and put custom CSS code there?

Comments

stefan.korn created an issue. See original summary.

silvesterde’s picture

Same for me.
i added

libraries:
  - /static/sass/lib

stylesheets-remove:
  - /static/sass

If that is right? Given directories

libraries:
  - STARTERKIT/main

stylesheets-remove:
  - fortytwo/base

do not exist, so i entered, what i found.

  • fabianderijk committed 2b13287 on 8.x-1.x
    Issue #2620902 by stefan.korn, silvesterde: What about libraries.yml -...
fabianderijk’s picture

Status: Active » Fixed

I've accidentally removed the main css file from the STARTERKIT i guess. The file is now added again in the 1.3 version of the theme. Thanks for noticing!

stefan.korn’s picture

@fabianderijk: Thanks for fixing

@silvesterde
Probably you are misunderstanding something here. You reference to STARTERKIT.info.yml:

libraries:
  - STARTERKIT/main

stylesheets-remove:
  - fortytwo/base

The first entry means that the library defined as main in STARTERKIT.libraries.yml gets loaded, this means:

static/css/main.css
and
static/js/main.js

The second entry means that the stylesheets that are defined in fortytwo.libaries.yml (the base theme) under base gets removed. This means static/css/fortytwo.css gets removed (from the base theme).

I do not think that your code

libraries:
  - /static/sass/lib

stylesheets-remove:
  - /static/sass

will work.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.