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

Dont compile or load style-admin when CDN is enable #241

Open
fgdaniel opened this issue Apr 5, 2023 · 1 comment
Open

Dont compile or load style-admin when CDN is enable #241

fgdaniel opened this issue Apr 5, 2023 · 1 comment
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@fgdaniel
Copy link

fgdaniel commented Apr 5, 2023

Describe the bug
When we want to activate the tailwind css cdn option, then styles admin.min.css is loaded in the admin area

To Reproduce
If the styles-admin.min.css file already exists in our theme

Expected behavior
When we activate the tailwindcss option, we expect that the styles-admin.min.css file will no longer be loaded in the admin area, it will only be loaded if the tailwindcss option is deactivated, obviously remember that we have to build at the end after deactivating the option.

Screenshots
screen 1
screen 2

WordPress, Plugins
WordPress version: 6.2
Pilo'Press version: 0.4.3.2
ACF Pro version: 6.1.2
ACFE version: 0.8.9.3
ACF add-ons: None

NOTE: After we delete style-admin.min.css the option work as expected, good job!

@fgdaniel fgdaniel changed the title Dont compile style-admin when CDN is enable Dont compile or load style-admin when CDN is enable Apr 5, 2023
@barnemax-pilotin
Copy link
Contributor

Hi, thanks for the feedback.

We could but we would need to also enqueue the CDN in the admin area and add a admin_enqueue_scripts action and another function/tweak the existing one to handle the admin case (adding the admin prefix in the Tailwind config) (hook that loads the CDN in front) and toggle the filter pip/enqueue/admin/remove to true (here)

We would need to make some tests to see if there is no conflict between the CDN and the rest :)

@barnemax-pilotin barnemax-pilotin added the enhancement New feature or request label Apr 5, 2023
@barnemax-pilotin barnemax-pilotin added this to the 0.4.4 milestone Apr 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants