css - Why isn't my theme processing SASS?

It's my understanding that Wordpress now processes SASS files but for some reason mine don't work.I'm try

It's my understanding that Wordpress now processes SASS files but for some reason mine don't work.

I'm trying to call it using wp_enqueue_style directly in header.php via the head tag:

<?php wp_enqueue_style('stylesheet', get_template_directory_uri() . '/style.css', $ver = false, $media = 'screen') ?>

Instead, the file gets called as a normal CSS doc.

I attempted to rename style.css to style.scss but then the file doesn't load at all, so I guess the sass pre-processor just isn't firing.

It's my understanding that Wordpress now processes SASS files but for some reason mine don't work.

I'm trying to call it using wp_enqueue_style directly in header.php via the head tag:

<?php wp_enqueue_style('stylesheet', get_template_directory_uri() . '/style.css', $ver = false, $media = 'screen') ?>

Instead, the file gets called as a normal CSS doc.

I attempted to rename style.css to style.scss but then the file doesn't load at all, so I guess the sass pre-processor just isn't firing.

Share Improve this question edited Jun 8, 2016 at 22:43 rib3ye asked Jun 8, 2016 at 22:37 rib3yerib3ye 1336 bronze badges 5
  • It's my understanding that Wordpress now processes SASS files … why do you think it does? – fuxia Commented Jun 8, 2016 at 23:19
  • @toscho core.trac.wordpress/changeset/26137 – rib3ye Commented Jun 8, 2016 at 23:24
  • I think that's only for a user's choice of colourscheme in the admin screens. – Andy Macaulay-Brook Commented Jun 8, 2016 at 23:39
  • You're probably better to enqueue the styles using the wp_enqueue_scripts hook, too. Check the User Contributed Notes » Using a Hook section on this page. – Pat J Commented Jun 9, 2016 at 1:28
  • 2 @nipponese That was for preprocessing core files on the wordpress server. It happens before WordPress is packed and distributed. That has no relevance for themes. – fuxia Commented Jun 9, 2016 at 2:20
Add a comment  | 

1 Answer 1

Reset to default 2

@nipponese is right. WordPress doesn't process Sass for themes. That was just for core files on wordpress.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1742389797a4434783.html

相关推荐

  • css - Why isn&#39;t my theme processing SASS?

    It's my understanding that Wordpress now processes SASS files but for some reason mine don't work.I'm try

    16小时前
    20

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信