Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/36.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/list/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何在Genesis框架中应用较少的css_Css_Frameworks_Less_Lesscss Resources - Fatal编程技术网

如何在Genesis框架中应用较少的css

如何在Genesis框架中应用较少的css,css,frameworks,less,lesscss-resources,Css,Frameworks,Less,Lesscss Resources,任何人都能体验到在Genesis框架中应用较少CSS样式的Bones子主题吗? 我怎样才能开始呢 请告知 适用于任何WordPress主题。首先使用函数删除主题样式表。不要删除这些文件(对于大多数主题,这将是style.css,可能还有其他一些主题样式表)不要删除这些文件。请注意,Genesis框架使用操作对样式表进行排队和出列。要删除它们,请使用remove_操作('genesis_meta','genesis_load_stylesheet')(来源:) 然后创建一个index.less文件

任何人都能体验到在Genesis框架中应用较少CSS样式的Bones子主题吗? 我怎样才能开始呢


请告知

适用于任何WordPress主题。首先使用函数删除主题样式表。不要删除这些文件(对于大多数主题,这将是style.css,可能还有其他一些主题样式表)不要删除这些文件。请注意,Genesis框架使用操作对样式表进行排队和出列。要删除它们,请使用
remove_操作('genesis_meta','genesis_load_stylesheet')(来源:)

然后创建一个index.less文件,该文件应包含如下所示的内容:

@import (less) "style.css"; // correct path to you original /wp_content/themes/{your_theme}/style.css
@import (less) "otherthemefile.css" // correct path to you original /wp_content/themes/{your_theme}/otherthemefile.css
/* custom less code here */

最后,将
index.less
文件编译成类似
main.css的文件。将
main.css
上传到主题目录中,并用于将其加载到主题中。

感谢您的帮助!