Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the possibility to combine multiple files into one compiled css #79

Closed
Bicarbona opened this issue Dec 7, 2014 · 5 comments
Closed

Comments

@Bicarbona
Copy link

wp_enqueue_style('theme-main', get_stylesheet_directory_uri().'/stylesheets/theme-main.less');
wp_enqueue_style('theme-extra', get_stylesheet_directory_uri().'/stylesheets/theme-extra.less');

---> combine-main-extra.css

@meitzner-hannes
Copy link
Collaborator

You dont have to do it that way. Use the @include function in your less file.

@Bicarbona
Copy link
Author

The LESS can not use conditionally include as PHP

Example

if($some){
wp_enqueue_style('theme-main', get_stylesheet_directory_uri().'/stylesheets/theme-main.less');
} ... etc

@thom4parisot
Copy link
Owner

I'd rather use the when guard and programmatically create a Less variable, and dynamically include it as @meitzner-hannes suggests.

@Bicarbona
Copy link
Author

to oncletom
thank you for your advice 👍

@pixelbart
Copy link
Collaborator

Closed, due to age. If the problem persists, please reopen the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants