table styles not applied by bootstrap sub-theme I'm writing a custom sub-theme of bootstrap with Drupal 9, and have noticed that table elements in my forums do not render properly:

This is despite me selecting &quot;Bordered Table&quot; in the configuration settings:

The next thing I tried was using Chrome's &quot;inspect&quot; feature to manually add class = &quot;table&quot; to the table element, which caused it render much more nicely;

I don't see any options to apply that class to table elements, either in the forum settings nor in the bootstrap settings.
I have a few questions to help me (and hopefully others) understand what's happening here;

Is adding the class = &quot;table&quot; to table elements the right approach?
Assuming it is, what's the right way to apply this class to table elements? (I've not averse to writing php code, I've just never written a theme before so I don't know where to start)
What's the point of those bootstrap table settings - they don't seem to do anything?

EDIT:
As per leymannx's suggestion, I've enabled twig debugging and looked at the resulting html:
&lt;!-- THEME DEBUG --&gt;
&lt;!-- THEME HOOK: 'forums' --&gt;
&lt;!-- FILE NAME SUGGESTIONS:
   * forums--containers--0.html.twig
   * forums--0.html.twig
   * forums--containers.html.twig
   x forums.html.twig
--&gt;
&lt;!-- BEGIN OUTPUT from 'core/modules/forum/templates/forums.html.twig' --&gt;
  

&lt;!-- THEME DEBUG --&gt;
&lt;!-- THEME HOOK: 'forum_list' --&gt;
&lt;!-- BEGIN OUTPUT from 'core/modules/forum/templates/forum-list.html.twig' --&gt;
&lt;table&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th&gt;Forum&lt;/th&gt;
      &lt;th&gt;Topics&lt;/th&gt;
      &lt;th&gt;Posts&lt;/th&gt;
      &lt;th&gt;Last post&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
      &lt;tr&gt;
      &lt;td&gt;
                          &lt;div title=&quot;No new posts&quot;&gt;
            &lt;span class=&quot;visually-hidden&quot;&gt;No new posts&lt;/span&gt;
          &lt;/div&gt;
          &lt;div&gt;&lt;a href=&quot;/forum/1&quot;&gt;General discussion&lt;/a&gt;&lt;/div&gt;
                      &lt;div&gt;&lt;/div&gt;
                        &lt;/td&gt;
              &lt;td&gt;
          0
                  &lt;/td&gt;
        &lt;td&gt;0&lt;/td&gt;
        &lt;td&gt;

&lt;!-- THEME DEBUG --&gt;
&lt;!-- THEME HOOK: 'forum_submitted' --&gt;
&lt;!-- BEGIN OUTPUT from 'core/modules/forum/templates/forum-submitted.html.twig' --&gt;
  n/a

&lt;!-- END OUTPUT from 'core/modules/forum/templates/forum-submitted.html.twig' --&gt;

&lt;/td&gt;
          &lt;/tr&gt;
    &lt;/tbody&gt;
&lt;/table&gt;

&lt;!-- END OUTPUT from 'core/modules/forum/templates/forum-list.html.twig' --&gt;
leymannx suggested twig debugging, which was super helpful. The solution I came up with was to copy the core/modules/forum/templates/forum-list.html.twig file into mytheme/templates and then modify it to take the table theming elements from the system/table.html.twig file in bootstrap.
Here's the end result:
{#
/**
 * @file
 * Default theme implementation to display a list of forums and containers.
 *
 * Available variables:
 * - forums: A collection of forums and containers to display. It is keyed to
 *   the numeric IDs of all child forums and containers. Each forum in forums
 *   contains:
 *   - is_container: A flag indicating if the forum can contain other
 *     forums. Otherwise, the forum can only contain topics.
 *   - depth: How deep the forum is in the current hierarchy.
 *   - zebra: 'even' or 'odd', used for row class.
 *   - icon_class: 'default' or 'new', used for forum icon class.
 *   - icon_title: Text alternative for the forum icon.
 *   - name: The name of the forum.
 *   - link: The URL to link to this forum.
 *   - description: The description field for the forum, containing:
 *     - value: The descriptive text for the forum.
 *   - new_topics: A flag indicating if the forum contains unread posts.
 *   - new_url: A URL to the forum's unread posts.
 *   - new_text: Text for the above URL, which tells how many new posts.
 *   - old_topics: A count of posts that have already been read.
 *   - num_posts: The total number of posts in the forum.
 *   - last_reply: Text representing the last time a forum was posted or
 *     commented in.
 * - forum_id: Forum ID for the current forum. Parent to all items within the
 *   forums array.
 *
 * @see template_preprocess_forum_list()
 *
 * @ingroup themeable
 */
#}
{% if responsive %}
  &lt;div class=&quot;table-responsive&quot;&gt;
{% endif %}
{%
  set classes = [
    'table',
    bordered ? 'table-bordered',
    condensed ? 'table-condensed',
    hover ? 'table-hover',
    striped ? 'table-striped',
    sticky ? 'sticky-enabled',
  ]
%}
&lt;table{{ attributes.addClass(classes) }}&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th&gt;{{ 'Forum'|t }}&lt;/th&gt;
      &lt;th&gt;{{ 'Topics'|t }}&lt;/th&gt;
      &lt;th&gt;{{ 'Posts'|t }}&lt;/th&gt;
      &lt;th&gt;{{ 'Last post'|t }}&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
  {% for child_id, forum in forums %}
    &lt;tr&gt;
      &lt;td{% if forum.is_container == true %} colspan=&quot;4&quot;{% endif %}&gt;
        {#
          Enclose the contents of this cell with X divs, where X is the
          depth this forum resides at. This will allow us to use CSS
          left-margin for indenting.
        #}
        {% if forum.depth &gt; 0 %}{% for i in 1..forum.depth %}&lt;div class=&quot;indent&quot;&gt;{% endfor %}{% endif %}
          &lt;div title=&quot;{{ forum.icon_title }}&quot;&gt;
            &lt;span class=&quot;visually-hidden&quot;&gt;{{ forum.icon_title }}&lt;/span&gt;
          &lt;/div&gt;
          &lt;div&gt;&lt;a href=&quot;{{ forum.link }}&quot;&gt;{{ forum.label }}&lt;/a&gt;&lt;/div&gt;
          {% if forum.description.value %}
            &lt;div&gt;{{ forum.description.value }}&lt;/div&gt;
          {% endif %}
        {% if forum.depth &gt; 0 %}{% for i in 1..forum.depth %}&lt;/div&gt;{% endfor %}{% endif %}
      &lt;/td&gt;
      {% if forum.is_container == false %}
        &lt;td&gt;
          {{ forum.num_topics }}
          {% if forum.new_topics == true %}
            &lt;br /&gt;
            &lt;a href=&quot;{{ forum.new_url }}&quot;&gt;{{ forum.new_text }}&lt;/a&gt;
          {% endif %}
        &lt;/td&gt;
        &lt;td&gt;{{ forum.num_posts }}&lt;/td&gt;
        &lt;td&gt;{{ forum.last_reply }}&lt;/td&gt;
      {% endif %}
    &lt;/tr&gt;
  {% endfor %}
  &lt;/tbody&gt;
&lt;/table&gt;
{% if responsive %}
  &lt;/div&gt;
{% endif %}

The table now seems to render sensibly;