thom4
Forum Replies Created
-
Agreed!
This is a good idea to leverage users level as enqueuing stylesheets SHOULD BE their preferred way to include stylesheets in their themes.
Well, files are generated in the wp-content/uploads folder, the one defined by WordPress to be writeable. It is the only folder that is mandatory writeable so I rely on this to be totally sure the compilation process will be successful.
The random string appended to the file is used for Webperformance cache busting purpose. Some servers configuration (like HTML5Boilerplate defaults htaccess) caches stylesheets for weeks/months.
We want an immediate download in the browsers for a changed compiled stylesheet.
This can be done only with a different filename, nothing more.It is though much more compliant with anything with almost no configuration.
Hi jorijnsmit,
thanks for your updates in the instructions. Things got clearer ??
I fixed the quotes btw. I used IA Writer to write stuff in the train but I forgot it replaced them with proper chars (textually speaking).As I’m pretty excited by your proposal, I see some drawbacks like the import order in the
/less
directory.I am much more favorable to a proper UI but… if someones can write LESS code, code a theme and already write a wp_enqueue_stylesheet, I guess it can write my_stylesheet.less instead of my_sylesheet.css in this function.
I have to think about it to imagine what expectation it would fullfil.
Forum: Plugins
In reply to: [WP-LESS] [Plugin: WP-LESS] Root-relative pathsYour problem may has been fixed within [this issue](https://github.com/oncletom/wp-less/pull/19) and in release
1.5.1
Forum: Plugins
In reply to: [WP-LESS] [Plugin: WP-LESS] WP 3.4Problem finally addressed by a contribution — https://github.com/oncletom/wp-less/pull/18
Lands in 1.5.0.
Forum: Plugins
In reply to: [WP-LESS] [Plugin: WP-LESS] WP 3.4I’ve digged in the code: they enqueue CSS files on
wp_enqueue_scripts
, which is AFTERwp
action and beforewp_print_styles
.They recommend to compile files as yourtheme/style.css.
Anyway, their way of registering CSS is not very handy, especially as it forces the browser to load 4 CSS files… which is counterproductive for performances.What I would do
add_action('wp_enqueue_scripts', 'customize_roots_css', 200); add_action('init', 'my_less_styles'); function customize_roots_css(){ wp_dequeue_style('roots_bootstrap'); wp_dequeue_style('roots_bootstrap_responsive'); wp_dequeue_style('roots_app'); wp_dequeue_style('roots_child'); } function my_less_styles(){ wp_enqueue_style('theme_main', get_stylesheet_directory_uri() . '/style.less'); }
Use
@import
to load bootstrap, responsive and roots CSS (if needed) to compile that in 1 working file.Forum: Plugins
In reply to: [WP-LESS] [Plugin: WP-LESS] WP 3.4wp_enqueue_scripts
is far too late for a hook to make this working at the moment.I’ve described the Processing Workflow on the project wiki.
I guess I could delay the LESS processing to the
wp_print_styles
action, in a low priority.It’s the case since the latest update of the plugin, 2 days ago.
Forum: Plugins
In reply to: [WP-LESS] [Plugin: WP-LESS] Compile directoryHi Barry,
tell me if the latest update solve your problem.
Forum: Plugins
In reply to: [WP-LESS] wp-less fails under httpsThe problem is addressed here: https://github.com/oncletom/wp-less/issues/8
I already run my blog over SSL and I did not encounter any problem with SSL.
So maybe you are using it a way I did not expected.Forum: Plugins
In reply to: [WP-LESS] [Plugin: WP-LESS] Less in IE7Hi,
sadly this problem is not related to the plugin. It seems it is a JavaScript issue.
This plugin compiles stuff to CSS, useable by any browser even IE.
Have fun!
Forum: Plugins
In reply to: [WP-LESS] [Plugin: WP-LESS] Root-relative pathsHi Marcus, thanks for your tip.
Would you recommend something special so as I could help you to push those things to be a built-in feature?
Forum: Plugins
In reply to: [WP-LESS] [Plugin: WP-LESS] WP 3.4Do you still encounter the problem?
I don’t see any change with WP 3.4.x.
Can you all copy/paste how you enqueue your CSS?
Thanks ??
Forum: Plugins
In reply to: [WP-LESS] [Plugin: WP-LESS] updating cache when @imported files changeHi,
Nice to see those technical conversations ??
Someone also asked to have an option to force compilation whenWP_DEBUG
is set to false. I don’t like very much making the task easy to decrease performances but maybe I’ll add another constant to ease the work if some people need it.Forum: Plugins
In reply to: [WP-LESS] [Plugin: WP-LESS] Issue(s) with WP Network Site and Domain mappingHi,
thanks for reporting the problem.
This is due to the constant usage. If the URL is changed from the admin, it does not alter the URL so that’s why the plugin does use the new address.A similar issue has been reported so maybe your problem will be addressed within the same fix.
I’ll do my best to fix this problem.