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 Parent Theme as option to Base Location #177

Closed
anebi opened this issue Mar 9, 2021 · 6 comments
Closed

Add Parent Theme as option to Base Location #177

anebi opened this issue Mar 9, 2021 · 6 comments

Comments

@anebi
Copy link

anebi commented Mar 9, 2021

Hello,

We are successfully using WP-SCSS and we are really happy with it, but I have a small request that I think shouldn't be a problem to be added for you.

We would like to have Parent Theme as an option in Base Location dropdown.

Right now we have Parent/Child theme usage model, but we have multiple SCSS files in parent theme and we would like to set WP-SCSS to generate the css files for them, because we don't use include of all those scss files into a main file. The reason for this is that we try to minify CSS usage and use only needed css, so we need WP-SCSS to give us an option to select Parent Theme in Base Location dropdown instead of setting Current Theme (in our case child theme). Like this can set parent paths for scss and css dirs instead of in child theme.

Thank you in advance.

Best regards,
Ali Nebi

wp-scss-patch.txt

Screenshot 2021-03-09 at 22 40 02

@shadoath
Copy link
Collaborator

Thank you for the notes.
Here is what I'm thinking.
I think this may have an impact on the enqueueing of css files, thus only a draft. You can pull down the branch and test if you would like.

@anebi
Copy link
Author

anebi commented Mar 11, 2021

Thank you. I will pull down the branch and do some tests. We are already using it with the patched version but we don't use enqueue option from plugin as our theme is custom, we do enqueue different way directly from theme and guttenberg blocks.

But yeah, enqueue stuff is a good note and should be checked. I will run some tests.

@anebi
Copy link
Author

anebi commented Mar 30, 2021

Hello,

I am sorry for my delayed reply. I just got some time to test the enqeue settings. I activated the enqueue setting in wordpress wp-scss settings and the parent files in css location were enqueue successfully. I don't see any errors or problems with this functionality.

When enqueue setting is active, plugin checks parent theme/assets/css (in our case where we have set parent-theme for base and assets/css for css file location) and if it finds generated css files in that directory, it enqueue them succesfully.

Best regards,
Ali Nebi

@anebi
Copy link
Author

anebi commented Apr 28, 2021

Hi,

Do you have some news about this feature? Is it going to be merged?

Best regards,
Ali

@shadoath
Copy link
Collaborator

@anebi, I updated the pr and set it ready to review. Can you test out that branch and let me know you see all 4 options for the "Base Directory"?

@anebi
Copy link
Author

anebi commented May 31, 2021

Hi, It looks like working. I see that the changes were merged already to a new released version of the plugin. So all good. Thanks a lot. I believe that we can close the ticket.

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

No branches or pull requests

2 participants