[wp-trac] [WordPress Trac] #57463: Twenty Twenty Three has no base styles for <table>

WordPress Trac noreply at wordpress.org
Tue Jan 17 07:06:18 UTC 2023


#57463: Twenty Twenty Three has no base styles for <table>
-----------------------------+------------------------------
 Reporter:  helgatheviking   |       Owner:  (none)
     Type:  feature request  |      Status:  new
 Priority:  normal           |   Milestone:  Awaiting Review
Component:  Bundled Theme    |     Version:  6.1.1
 Severity:  normal           |  Resolution:
 Keywords:                   |     Focuses:
-----------------------------+------------------------------

Comment (by poena):

 Hi!
 It is not possible for a theme to make sure that all plugins are styled.

 My first recommendation would be to use the table block instead of a
 custom table in your custom plugin. I do understand that is not always
 possible.

 In your plugin, you can enqueue the block style by referring to it's block
 slug. Then it is loaded even if the block itself is not present.
 -It will load as an extra, separate, style.css file.

 Basic example for the frontend:

 {{{
 function prefix_test() {
         wp_enqueue_style( 'wp-block-table' );
 }
 add_action( 'wp_enqueue_scripts', 'prefix_test' );
 }}}

 Aside: Note that the block places the wp-block-table class on the wrapping
 {{{figure}}} element and not on the {{{table}}}.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/57463#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list