Hello!

I followed instructions on https://tapestry.apache.org/css.html to change 
Tapestry (v5.7.3) default stylesheet to use Bootstrap-4.6.1 stylesheet, instead 
of the default Bootstrap-4.3.1:

*        Tapestry 5.5.0 and later also allows you to have Tapestry not provide 
any CSS at all. To do that, just add @ImportModule(NoBootstrapModule.class) to 
your module class. In this case, you'll need to set the 
tapestry.default-stylesheet (SymbolConstants#DEFAULT_STYLESHEET) configuration 
symbol to tell Tapestry what's your main CSS file. Otherwise, an exception will 
be thrown and the webapp won't start.

Here's what I ended up with in AppModule.java
@ImportModule(NoBootstrapModule.class)
public class AppModule
{
...........
    @ApplicationDefaults
    @Contribute(SymbolProvider.class)
    public static void setupEnvironment(final MappedConfiguration<String, 
String> configuration)
    {
        ..............
       configuration.add(SymbolConstants.DEFAULT_STYLESHEET, 
"context:css/bootstrap-4.6.1-dist/css/bootstrap.css");
    }
}

css/bootstrap-4.6.1-dist/css/bootstrap.css is included in the webapp folder. 
When the application runs after the above changes, it still shows the default 
Bootstrap css (v4.3.1).
<link type="text/css" rel="stylesheet" 
href="/MyApp/assets/meta/zae851f6d/tapestry5/bootstrap4/css/bootstrap.css">
/*!
*        Bootstrap v4.3.1 (https://getbootstrap.com/)
*        Copyright 2011-2019 The Bootstrap Authors
*        Copyright 2011-2019 Twitter, Inc. * Licensed under MIT 
(https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
Do you see what might be missing or mistaken? Please advise.

Thank you!
Feng Gao

Reply via email to