The solution provided by Cristian above works also for CoreUI, which is based on Bootstrap 5. Definitely the right answer