你的主题需要风格。css将出现在主题的根目录中,顶部有一个注释标题,其中包含有关主题的信息,如下所示:
/*
Theme Name: Twenty Nineteen
Theme URI: https://wordpress.org/themes/twentynineteen/
Author: the WordPress team
Author URI: https://wordpress.org/
Description: Our 2019 default theme is designed to show off the power of the block editor. It features custom styles for all the default blocks, and is built so that what you see in the editor looks like what you\'ll see on your website. Twenty Nineteen is designed to be adaptable to a wide range of websites, whether you’re running a photo blog, launching a new business, or supporting a non-profit. Featuring ample whitespace and modern sans-serif headlines paired with classic serif body text, it\'s built to be beautiful on all screen sizes.
Requires at least: WordPress 4.9.6
Version: 1.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: twentynineteen
Tags: one-column, flexible-header, accessibility-ready, custom-colors, custom-menu, custom-logo, editor-style, featured-images, footer-widgets, rtl-language-support, sticky-post, threaded-comments, translation-ready
*/
因此,您真正需要考虑的唯一一件事是,您的构建过程是否删除了注释。如果编译SCS时删除了注释,则生成的样式表对样式无效。css,因为它将丢失标题注释。如果要编译为样式。css,请确保您没有删除注释,或者有一个在编译后插入注释的过程。
除此之外的任何事情实际上都只是一个意见问题,以及你喜欢如何组织事情。