【问题标题】:Custom theme not loading css Drupal 8自定义主题不加载css Drupal 8
【发布时间】:2023-03-29 01:17:01
【问题描述】:

我正在创建一个 drupal 主题,但 css 没有加载。

我已经清除了缓存,但它仍然没有加载。

我的info.yml

name: Waluigi
description: Just a test
type: theme
core: 8.x

libraries:
  -waluigi/global-styling

我的libraries.yml

global-styling:
  version: VERSION
  css:
    theme:
      css/style.css: {}

样式表放在/themes/custom/waluigi/css

谁能告诉我我错过了什么?

【问题讨论】:

  • 您收到错误消息还是只是没有加载?
  • 不,只是没有加载。

标签: php drupal drupal-8


【解决方案1】:

您在“-”之后缺少一个空格。所以应该是这样的:

- waluigi/global-styling

【讨论】:

    【解决方案2】:

    哦,我必须在连字符后加一个空格。

      - waluigi/global-styling
    

    【讨论】:

      猜你喜欢
      • 2016-05-03
      • 2021-02-15
      • 1970-01-01
      • 2019-07-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-08-04
      相关资源
      最近更新 更多