godaddy-wordpress / coblocks

A suite of professional page building content blocks for the WordPress Gutenberg block editor.
https://wordpress.org/plugins/coblocks/
GNU General Public License v2.0
749 stars 146 forks source link

Load extension styles with relevant core blocks #2591

Closed AnthonyLedesma closed 8 months ago

AnthonyLedesma commented 8 months ago

Description

Load extension styles for specific core block styles. This moves the styles out of global style-coblocks-1.css file into style-coblocks-extensions. It also ensures that expected extension styles are loaded for the respective core blocks. New tests to validate proper enqueue for expected blocks.

Screenshots

Before Screenshot 2024-02-28 at 8 22 06 AM

After Screenshot 2024-02-28 at 9 03 13 AM

Types of changes

Php changes to enqueue logic, relocation of styles, and some extension files for consistency.

How has this been tested?

Tested manually, tested with Unit Tests.

Acceptance criteria

Must enqueue block style css when only the core block is used. core/image core/button core/list core/media-text core/cover

Checklist: