A theme provides the look and feel of several built-in widgets, using CSS style rules. The rules for each CSS theme are defined in the folder resources/themes/. There each theme is organized in a subfolder.
You can choose from three themes:
There are three versions of this theme, implemented through the WBootstrap5Theme, WBootstrap3Theme, and WBootstrap2Theme classes. They rely on the Bootstrap CSS framework. Use setTheme(std::make_shared<WBootstrap5Theme>()) to use this theme.
As of version 4.6.0, Bootstrap versions 2, 3, and 5
are supported. Prior to 4.6.0 there was WBootstrapTheme,
which is now deprecated in favor of WBootstrap2Theme,
WBootstrap3Theme, WBootstrap4Theme
and WBootstrap5Theme.
The widget gallery has been restyled to use Bootstrap 5.
While the theme makes sure that Wt's widgets
are rendered with the markup expected by bootstrap, there
are many features that are particular to the layout system
of bootstrap (and were changed between various versions of
Bootstrap). Thus you need to know how bootstrap expects you to
layout widgets in order to effectivily use this theme, for
which we refer to the Bootstrap
documentation.
Setting an empty theme (with parameter "") will result in a stub CSS theme that does not load any stylesheets.