[wp-trac] [WordPress Trac] #21082: The Gallery shortcode relies on #gallery-instance to hook the CSS, but the id sometimes isn't specific enough
WordPress Trac
noreply at wordpress.org
Tue Jul 12 17:24:31 UTC 2022
#21082: The Gallery shortcode relies on #gallery-instance to hook the CSS, but the
id sometimes isn't specific enough
-------------------------------------+-----------------------
Reporter: matveb | Owner: obenland
Type: defect (bug) | Status: closed
Priority: normal | Milestone:
Component: Gallery | Version:
Severity: normal | Resolution: wontfix
Keywords: needs-testing has-patch | Focuses:
-------------------------------------+-----------------------
Changes (by desrosj):
* status: accepted => closed
* resolution: => wontfix
Comment:
I'm going to close this out as a `wontfix`.
A [https://wpdirectory.net/search/01G7SPRYX30WYTFAHT358WY7JN search of the
theme directory today] returns 271 occurrences of `#gallery-1` in 112
themes. Unfortunately I think this is just something we'll need to live
with to maintain backwards compatibility in themes.
Additionally, with the introduction of the block editor and full site
editing, shortcodes (though still supported) are no longer the recommended
way to display a gallery.
This has been solved in the gallery block. IDs are no longer used, and a
`.wp-block-gallery` class is applied to the `<figure>` tag wrapping the
gallery images.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/21082#comment:12>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list