Archived topic
Registering the new CSS File
3 replies · Started by Marcel on February 24, 2020
Hello,
1. Should I register a new CSS file before enqueuing it?
I would like to use it on a custom ACF block.
2. The new CSS stylesheet will overwrite the default CSS style (for that ACF block only)?
3. Is it a good idea to dequeue the default CSS style for the page/ post where the ACF block will be placed?
Your thoughts, please!
Thank you!
Marcel
Hi there,
There's no need to register a file if you're going to enqueue it right away - enqueuing registers it for you.
It won't replace an existing file automatically, so you would need to dequeue the other file manually if it's no longer necessary.
Thank you, Tom!
You're welcome :)