In SassMediaNode.php on line 82
This is when I’m using Foundation.
Perhaps its time for an update to the latest version of phpsass?
This actually works pretty well, if you bear 3 things in mind:
1.) you can NOT use ‘style’ as your style sheet name
probably a ‘safety’ thing, but it will throw an error.
The error doesn’t show on my site (see below). Anyway, just leave
a ‘stub’ style.css in the theme, and put all your stuff in mystyle.scss or whatever (see the install directions)
2.) the error output in wordpress_sass.php doesn’t work on my site.
you can add error_log("SASS: $error: $message");
to the
wpsass_report_error function in wordpress_sass.php
3.) you need to edit wordpress_sass.php
As others have noticed, there is a broken comment generated as the
first line of the css file. Edit wordpress_sass.php and fix the ‘/ * ‘ broken comment markers ( should ‘/*’ and ‘*/’). You can find them by searching for ‘DO NOT EDIT’
How can I trigger the re-importation of @import files? I make changes to them, but those changes don’t ever appear in the compiled *.css file. The only solution I have found is to delete the *.scss file from the server, upload a fresh *.css file, and re-upload my *.scss file, but this is too cumbersome to do with the regularity with which I update the @import fies.
]]>This might be a ridiculous question, but the generated CSS file has a comment at the top that looks like this:
/ * DO NOT EDIT - AUTOMATICALLY GENERATED FROM: filename.scss * /
Whereas it should look like this:
/* DO NOT EDIT - AUTOMATICALLY GENERATED FROM: filename.scss */
Now, I realize that this is an easy fix–I fixed it myself in a few seconds. But why does it do this? Without the proper comment syntax, the CSS file isn’t properly parsed by the browser (at least my browser, Chrome/latest/OSX 10.8). I’ve never seen comments that look like that before, not in CSS or SASS. If anyone could provide some insight so I could understand, I would appreciate that.
Thanks for reading.
]]>Hi,
I’m using this syntax at the beginning of my .scss file
@import "reset.css";
… but in the generated .css file Sublime Text tells me that ‘css is not allowed there’
it’s also obvious on my site that it’s not working.
In the .css file, before the @import rule appears, I have the automatically inserted line
/ * DO NOT EDIT - AUTOMATICALLY GENERATED FROM: magic.scss * /
So, how can I make this work? I don’t want to add all the CSS via functions.php, so as to reduce the calls to separate CSS files.
Thanks for this plugin, it’s been working great otherwise!
]]>When I enter bare data uris in my scss file (without quotes), the whole line is stripped from the final css file, example below:
background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iNjAiIGhlaWdodD0iMzAiPgo8ZGVmcz4KPHJlY3QgaWQ9InIiIHdpZHRoPSIzMCIgaGVpZ2h0PSIxNSIgZmlsbD0iI2JiMDg1ZiIgc3Ryb2tlLXdpZHRoPSIyLjUiIHN0cm9rZT0iIzdhMDU0ZCI+PC9yZWN0Pgo8ZyBpZD0icCI+Cjx1c2UgeGxpbms6aHJlZj0iI3IiPjwvdXNlPgo8dXNlIHk9IjE1IiB4bGluazpocmVmPSIjciI+PC91c2U+Cjx1c2UgeT0iMzAiIHhsaW5rOmhyZWY9IiNyIj48L3VzZT4KPHVzZSB5PSI0NSIgeGxpbms6aHJlZj0iI3IiPjwvdXNlPgo8L2c+CjwvZGVmcz4KPHVzZSB4bGluazpocmVmPSIjcCIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMCAtMjUpIHNrZXdZKDQwKSI+PC91c2U+Cjx1c2UgeGxpbms6aHJlZj0iI3AiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDMwIDApIHNrZXdZKC00MCkiPjwvdXNlPgo8L3N2Zz4=);
When I enter it with quotes, it stays intact, but then is not rendered correctly by the browser–it looks for a relative path. When I inject it into the CSS using Chrome’s inspect, it shows up as it should.
This happens with any Data URIs that I try to enter manually.
Thanks for any help you can give!
]]>I’m attempting to drop this into a pre-existing theme and convert my styles to sass.
I followed the instructions and am not getting any errors, just no compiling. I’m thinking that it probably doesn’t know to generate the first .css file??
In my theme directory, I have an empty style.css (except for the commented head), a core.sass and an empty core.css
In functions.php I have:
// SASS/SCSS Stylesheet Definition
function generate_css() {
if(function_exists(‘wpsass_define_stylesheet’)) {
wpsass_define_stylesheet(“core.sass”, true);
}
}
add_action( ‘after_setup_theme’, ‘generate_css’ );
Your help is greatly appreciated, I would love to use sass again!
]]>For some reason the generated file is also included for the admin section.
I removed it with the help of is_admin() function:
/**
* SASS/SCSS Stylesheet Definition.
*/
function generate_css() {
if(function_exists(‘wpsass_define_stylesheet’) && !is_admin()) {
wpsass_define_stylesheet(“mystyle.scss”, true);
}
}
add_action(‘after_setup_theme’, ‘generate_css’ );
I’m not talking about php’s fatal error but a error in generated css that the browsers can’t handle. The first line:
/ * DO NOT EDIT – AUTOMATICALLY GENERATED FROM: mystyle.scss * /
has spaces after / and before.
Hey,
I’m building on the Required+ Foundation theme and I wanted to use SASS for my own styling, so your plugin is a real help. It’s not necessary, but Foundation traditionally puts app.css (the developer CSS file) in a separate stylesheets directory and WordPress SASS expects it in the theme directory. I made these changes so developers can specify a sub-directory:
Also, the comment heading app.css was being read as CSS because of the space between / and * (Firefox 18). I changed lines 84 and 85 to fix.
]]>I’d added the function and added my style.scss file to the site root. It’s not recompiling style.css.
]]>Hey there,
I thought this might be the perfect match for my first SASS steps on WordPress. However, when following your steps to enable SASS I simply get an almost empty stylesheet which only says:
/* DO NOT EDIT – AUTOMATICALLY GENERATED FROM: style.scss */
No styles are being translated. Is this due to the age of your plugin, i.e. not working anymore or something on my side? Auto-compiling it via SSH/SASS on the server is working flawlessly. Can you help me out on this? CHMOD is fine, of course ;). Debutmode (‘true’) hasn’t brought up any errors.
Best
physalis
the full error is
WPSASS – Error Parsing SASS FileProperties can not be assigned at root level
what does that mean? it occurs when i try to paste in the normalize.css
]]>Approximately the first half of my local stylesheet is rendered properly from the .scss file to regular css. then it just truncates the rest, which isn’t workable. i’m trying to debug this as i type, but was hoping someone else would have ideas too.
]]>