我试图使一个自定义的WordPress主题使用顺风,但风格似乎是失踪,但CSS文件本身似乎是公认的,因为主题信息是公认的WordPress的。
这是我正在使用的文件functions.php
<?php
function enqueue_tailwind_styles() {
// Enqueue the style.css file from the theme root
wp_enqueue_style('tailwind', get_template_directory_uri() . '/style.css', array(), '1.0.0', 'all');
}
add_action('wp_enqueue_scripts', 'enqueue_tailwind_styles');
// Add other theme functions below...
remove_action( 'shutdown', 'wp_ob_end_flush_all', 1 );
样式.css
@import '../../theme-info.css';
@import 'tailwindcss/base';
@import 'tailwindcss/components';
@import 'tailwindcss/utilities';
theme-info.css
/*
Theme Name: Car_Dealer_Groovy
Theme URI: https:/placeholder.com
Author: Santiago Mejia Wilches
Author URI: https://placeholder.com
Description: Custom theme made for a car company, name pending as of writing.
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: your-text-domain
*/
style.css
/*
Theme Name: Car_Dealer_Groovy
Theme URI: https:/placeholder.com
Author: Santiago Mejia Wilches
Author URI: https://placeholder.com
Description: Custom theme made for a car company, name pending as of writing.
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: your-text-domain
*/
/*
! tailwindcss v3.3.3 | MIT License | https://tailwindcss.com
*/
/*
1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)
2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)
*/
*,
::before,
::after {
box-sizing: border-box; /* 1 */
border-width: 0; /* 2 */
border-style: solid; /* 2 */
border-color: #e5e7eb; /* 2 */
}
more css...
在style.css文件上的WordPress信息似乎是工作,但CSS本身没有,CSS代码似乎没有故障,因为当我手动将CSS放在WordPress中它的工作原理,这是它看起来如何当我把CSS手动和我通常看起来如何x1c 0d1xx 1c 1d 1x我试图改变路径,添加和删除/似乎也不能解决这个问题
1条答案
按热度按时间fykwrbwg1#
重新安装WordPress然后更改/似乎已经修复了它