Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我知道它是为编译 .less 文件而构建的,但我真的很希望能够以一种很好的方式添加 vanilla CSS 文件。
是的,这是绝对可能的。较少的文件只是被编译成 pub 目录中的 css。要添加您自己的静态 css 文件,您只需将它们放在 css 目录 (/app/design/frontend/{vendor}/{theme}/web/css) 中,它们将像任何较少编译的 css 文件一样被访问。
根据您的 magento 配置,您可能需要首先bin/magento setup:static-content:deploy从您的 magento 安装的根目录运行。
bin/magento setup:static-content:deploy