Answers:
我们可以lib
在自定义主题中覆盖less文件。将此文件放在文件web
夹下:
app/design/frontend/{Vendor}/{Theme}/web/mage/gallery/gallery.less
并增加mage/gallery/gallery
在PROJECT/dev/tools/grunt/configs/themes.js
(或PROJECT/dev/tools/grunt/configs/local-themes/themes.js
为Magento的2.2),使咕噜编译它。
app/design/frontend/{Vendor}/{Theme}/web/css/source/lib/mage/gallery/gallery.less
Compilation from source: /app/design/frontend/{Vendor}/{theme_name}/web/css/source/lib/mage/gallery/gallery.less Compilation from source: frontend/{Vendor}/{theme_name}/en_US/css/source/lib/mage/gallery/gallery.less Unable to get content for 'frontend/{Vendor}/{theme_name}/en_US/css/source/lib/mage/gallery/module/_variables.less'
在用于Grunt的自定义配置文件中,添加画廊文件的路径:“ mage / gallery / gallery”以及“ css / styles-m”和“ css / styles-l”