Hi Sebastian,
Thanks for a great and easy to use plugin! I’m planning to use it bundled in my custom starter theme, that I’m putting together based on _s and Bootstrap. I have the plugin files in a folder in my theme folder. I’m using the following to include the main file:
if ( !class_exists(‘ScssLibrary’) ) { include_once( get_template_directory() . ‘/inc/theme-plugins/scss-library/scss-library.php’ ); }
This gets the plugin in the admin bar and I can put it in the development mode. It does not however compile anything. I’m guessing I’d need to adjust some path somewhere. Can you please point me to the right direction?
Best,
Mikko
]]>Warning: Private methods cannot be final as they are never overridden by other classes in?wp-content/plugins/scss-library/vendor/baxtian/php-singleton/src/Singleton.php?on line?37
Warning: Private methods cannot be final as they are never overridden by other classes in?wp-content/plugins/scss-library/vendor/baxtian/php-singleton/src/Singleton.php?on line?46
PHP 8.0
]]>Hi,
I am trying to add an svg image using data:image/svg+xml;, but it converts it into a url to the theme.
Is there a way to skip it and avoid it to convert it?
Thanks
]]>I’ve tried to load bootstrap.scss from oficially downloaded sources (https://getbootstrap.com/docs/5.0/getting-started/download/) but it’s not working, it’s throwing some errors, so I think it’s not working… or maybe not with that complex source?
]]>Hi Baxtian,
is there a function I can call from anywhere to force a recompiling?
That would be very nice!
Thanks for help!
Best,
Tobias
CSS Data URLs (such as in bootstrap 4) are broken when using the plugin. The fix is to add “data:” to the exclusions within the below replacement regex:
src\ScssLibrary.php:272
$css = preg_replace('#(url\((?![\'"]?(?:https?:|/))[\'"]?)#miu', '$1' . dirname($url['path']) . '/', $css);
to
$css = preg_replace('#(url\((?![\'"]?(?:https?:|/|data:))[\'"]?)#miu', '$1' . dirname($url['path']) . '/', $css);
Hello,
First, thank you for providing and supporting this excellent plugin. It’s blooming excellent.
Secondly, a request.
The ability to hook setImportPaths would be very useful, allowing other plugins to provide scss boilerplates for example.
Something like this would do the trick in ScssLibrary.php:
$import_paths = apply_filters('scsslib_compiler_import_paths', dirname($in), $in);
$compiler->setImportPaths($import_paths);
Let me know what your thoughts are,
Thanks again!
I am using a single wordpress instance with different uploads directories based on each domain (Multi Tenancy Not Multisite). So I have the structure like this
– wp-content
— uploads
— site1
— site2
The issue is that the plugin generates the Build folder in the wp-content folder but it should be in uploads folder so it will be separate for every website. In the plugin where there is line for the WP-CONTENT Dir I have changed it to wp_uploads_dir()[basedir] in this way it creates the folder in subsite uploads folder but it takes alot of time and there is some cache issue too. Not sure if I need to adjust your plugin code some other places too. Can in the next update this change included so that instead of wp-content folder it generates the build in the uploads folder.
]]>Since WP 5.5 WP-SCSS crashes my site. Found your plugin – a life saver. Any chance to get SCSS-Library also to compress the produced CSS file?
]]>I’ve enqueued the style.scss file through wp_enqueue_style.
Notice: Undefined index: query in /…/plugins/scss-library/src/ScssLibrary.php on line 347
]]>Hi, I’ve tried installing on 5.3. I get the following error:
The plugin does not have a valid error
After trying to activate through the plugin page, I then get:
Parse error: syntax error, unexpected ':', expecting ';' or '{' in /wp-content/plugins/scss-library/src/ScssLibrary.php on line 71