Этот плагин не тестировался с последними 3 основными выпусками WordPress. Скорее всего, он уже не поддерживается и может быть несовместим с текущими версиями WordPress.

WP-SCSS

Описание

Compiles .scss files on your wordpress install using ScssPhp. Includes settings page for configuring directories, error reporting, compiling options, and auto enqueuing.

The plugin only compiles when changes have been made to the scss files. Compiles are made to the matching css file, so disabling this plugin will not take down your stylesheets. In the instance where a matching css file does not exist yet, the plugin will create the appropriate css file in the css directory.

Get detailed instructions on github

Looking for a new maintainer

If you are interested in giving back to the open source plugin respond here with your interest

Установка

  1. Загрузить плагин в каталог плагинов
  2. Активировать плагин через меню «Плагины» в WordPress
  3. Настроить параметры плагина на странице настроек Настройки - > WP-SCSS .

Часто задаваемые вопросы

Могу ли я использовать дочернюю тему?

Да, конечно. Убедитесь, что вы определили свои каталоги относительно вашей дочерней темы и что ваша дочерняя тема активна. В противном случае вы увидите ошибку в отношении отсутствующих каталогов.

What version of PHP is required?

PHP 7.2 is required to run WP-SCSS

Как я могу @import другие файлы

Вы можете импортировать другие файлы scss в родительские файлы и скомпилировать их в один файл css. Чтобы сделать это, используйте @import как обычно в вашем файле scss. Все импортированные имена файлов должны начинаться с подчеркивания. В противном случае они будут скомпилированы в собственный файл css.

При импорте в ваш scss-файл вы можете оставить символ подчеркивания.

@import 'subfile';

Поддерживает ли этот плагин Compass?

В настоящее время нет способа полностью поддерживать компас с помощью компилятора php. Если вам нужна ограниченная поддержка, вы можете вручную импортировать инфраструктуру компаса. Вам понадобится каталог _compass.scss и компас.

compass / frameworks / compass / stylesheets /@import ‘compass’;`

Кроме того, вы можете включить Бурбон аналогичным образом.

Могу ли я использовать синтаксис .sass с этим плагином?

Этот плагин будет работать только с .scss-форматом.

Не обновляет мой css файл, что происходит?

У вас есть ошибки на стороне сайта? Если нет, проверьте свой файл журнала в своем scss-каталоге. Css не будет обновляться, если в вашем файле sass есть ошибки.

Убедитесь, что ваши каталоги правильно определены в настройках. Пути определяются из корня темы.

У меня другие проблемы и нужна помощь.

Если у вас возникли проблемы с плагином, создайте тему в github , и мы сделаем все возможное, чтобы помочь.

Отзывы

17.08.2024
The settings for «auto enque» and «always recompile» dont get saved. It doesnt do anything. I configured two folders /precompile/css/ and precompile/scss/ and created a scss in the scss-folder, but i cant find a button or setting to actually compile that into css. Is there a documentation? How does this work!?
30.11.2022 1 ответ
The latest update breaks the site.. but if this happens it’s a fairly easy fix. Go to github.com/scssphp/scssphp Click on Code (in green) then Download Zip Extract the zip Upload everything in scssphp-master/src/* to your wp-content/plugins/wp-scss/src/ folder Refresh the page and you should be good. It looks like the author someone didn’t get all of the src folder added into the plugin in the latest update
25.11.2022 1 ответ
Unfortunately this plugin had some updates in the past that broke several websites. Updates were slow and manual rollbacks were necessary.
23.11.2022 1 ответ
Been using this for years and when it works, it works well. But after it broke client sites yet again with the most recent update, I have to question the QA on this plugin.
21.11.2022 1 ответ
I have a hard time not using this plugin in my projects since it makes implementing SCSS just SO easy for my dev team. On the other hand, there have been 2 times in the past year where a major issue occurred with an update resulting in lots of broken websites. In both cases the developers were slow to address the issue. At this date, the plugin fails catastrophically if «always recompile» is selected.
18.11.2022 1 ответ
They just upgraded it to version 3.0 and it DOES NOT WORK, it will crash your entire site. Developer has been unresponsive to everyone’s pleas to fix the catastrophic bug
Посмотреть 61 отзыв

Участники и разработчики

«WP-SCSS» — проект с открытым исходным кодом. В развитие плагина внесли свой вклад следующие участники:

Участники

Перевести «WP-SCSS» на ваш язык.

Заинтересованы в разработке?

Посмотрите код, проверьте SVN репозиторий, или подпишитесь на журнал разработки по RSS.

Журнал изменений

4.0.2

  • Full SVN commit to WordPress
  • With version bump

4.0.0

  • DO NOT USE, missing commited files on WP SVN
  • Updates ScssPHP to version 1.11.0 thanks to fabarea

3.0.1

  • Full SVN commit to WordPress

3.0.0

  • DO NOT USE, missing commited files on WP SVN
  • Updates ScssPHP to version 1.10.0 thanks to fabarea

2.4.0

  • Changes the base_compiling_folder to store key not path to directory shadoath
  • This allows deploying from local or staging to production by not saving absolute paths in DB.

2.3.5

  • Add ‘selected’ to wp_kses on select() shadoath

2.3.4

2.3.3

  • Fix params passed to wp_kses() shadoath

2.3.2

  • Add wp_kses() to echos with potential user input shadoath

2.3.1

  • Wrap check for WP_SCSS_ALWAYS_RECOMPILE with () niaccurshi

2.3.0

2.2.0

2.1.6

  • When enqueueing CSS files Defer to WordPress for URLs instead of trying to guess them. Change by mmcev106
  • Allow setting Base Directory to Parent theme folder. Shadoath

2.1.5

  • Enqueue CSS files using realpath function. Addition by mmcev106

2.1.4

  • Set source URL to be home_url(‘/’) not simply /. Issue found by realjjaveweb

2.1.3

  • Must declare global to use it for $base_compiling_folder.

2.1.2

  • Correction for enqueueing styles not defaulting to get_stylesheet_directory() Issue

2.1.1

  • Bug fixes after merging 2.0.2 and 2.1.0 defaults worked, but new options did not. Shadoath

2.1.0

  • Settings dropdown added for choosing additional base compile locations outside of current theme. Suggestion by pixeldesignstudio

2.0.2

  • Added option in settings to enable an ‘always recompile’ flag. Suggestion by bick

2.0.1

  • Bugfix to add filter for option_wpscss_options to remove Leafo if stored in DB. Thanks to kinky-org for pointing this out
  • Saving plugin settings will update DB with the correct value.

2.0.0

1.2.6

  • Create cache dir if it doesn’t exist [@XNBlank](https://github.com/ConnectThink/WP-SCSS/pull/135
  • Add cache dir as default @mhbapcc

1.2.5

1.2.4

  • Updated scssphp to version 0.7.5
  • Added source map @iannacone
  • Always define $wpscss_compiler in the global scope @jazbek

1.2.3

  • Обновлен scssphp до версии 0.7.2 @hellerbenjamin
  • Удален устаревший screen_icon ()

1.2.2

  • Updated scssphp to version 0.6.6

1.2.1

  • Changed set version option to update if already exists

1.2.0

  • Fixed a bug where directory inputs were not getting sanitized @mmcev106
  • Made the missing directory warning also display if a specified path is a file @mmcev106
  • Added /vendor to .gitignore @mmcev106
  • Dont enqueue already enqueued stylesheets @bobbysmith007

1.1.9

  • Added filter to set variables via PHP @ohlle
  • Added option to minify CSS output @mndewitt

1.1.8

Various improvements from pull requests by @jbrains and @brainfork

1.1.7

  • Update scssphp to 0.0.12 — pull from #16 @GabrielGil

1.1.6

  • Upgraded scss.inc.php to version 0.0.10; via pull request from kirkhoff

1.1.5

  • Added option to only show errors to logged in users; via pull request from tolnem

1.1.4

  • Add suport for subfolders in scss directory

1.1.3

  • Hotfix for a accidental character

1.1.2

  • Added support for moved wp-content directories

1.1.1

  • Added error handling for file permissions issues
  • Changed error log to .log for auto updating errors

1.0.0

  • Initial Build