GrantW
GrantW

Reputation: 98

SASS Files in Wordpress

Is there a way to access SCSS files from the Wordpress Theme editor UI? I have tried moving it to the root, next to my style.css and also leaving it in the SASS folder.

I am building a custom theme and already had SASS running on it locally and am now going to continue development in Wordpress.

Upvotes: 0

Views: 483

Answers (1)

ɴᴀᴛᴇ ᴅᴇᴠ
ɴᴀᴛᴇ ᴅᴇᴠ

Reputation: 4611

You have to add the file extension before it will show up in the editor. You can do this with the wp_theme_editor_filetypes filter.

For example:

add_filter('wp_theme_editor_filetypes', function ($types) {
    $types[] = 'scss';

    return $types;
});

Upvotes: 1

Related Questions