I have a Drupal 9.5.1 website with Bootstrap5 2.0.6 as its base theme. The theme by default places a search form by means of a block named "Search" in the "Additional navigation region".
This block "Search" is provided by core, but how its looks seems to be determined by the theme. If I change the theme to Bartik, the same block by default appears in the "Sidebar first" region, but the button to press to search is an icon (I believe it is fa-search
from FontAwesome), not the text "Search".
I have enabled Twig debugging, and found that in Bootstrap5 the search form is themed by:
themes/contrib/bootstrap5/templates/form/input.html.twig
In Bartik, the search form is themed by:
core/modules/system/templates/input.html.twig
In my subtheme, I want to do replace the text "Search" on the button with a an icon, just like you get by default if you set Bartik as the default.
But I am unable to locate where the look of of the Search button is defined and how to change it from text to the fa-search
icon that is used by Bartik.
So far I've looked for it in the templates that comes with Bootstrap5 and from core (used by Bartik), including the input.html.twig
that comes with both. There are subtle differences, but I am not able to pinpoint where the icon used by default by Bartik comes from.
I have tried to swap the one from core into my Bootstrap5 subtheme. This just removes the background colour on the button, but has no other effect.