bobbingwide / vgc

VGC - Garden Vista Group theme
GNU General Public License v2.0
0 stars 0 forks source link

Update bootstrap CSS to v5 #30

Closed bobbingwide closed 2 years ago

bobbingwide commented 2 years ago

For performance reasons I changed bootstrap on the home page to bootstrap v5.1.3, loading the CSS from the theme not the CDN ( https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css )

bootstrap.css is now being loaded twice on WooCommerce pages.

In order to remove the bootstrap 4 file(s) there are some styles that need to be changed to alter CSS class names. This is due to breaking changes in bootstrap 5; documented in https://getbootstrap.com/docs/5.0/migration/

The class name changes are:

From To
font-weight-* fw-*
text-left text-start

The other question is whether or not the bootstrap JavaScript is needed.

bobbingwide commented 2 years ago

I removed the 3 lines of bootstrap JS from header-shop.php and it appears to be working fine.

bobbingwide commented 2 years ago

Delivered in v1.2.1

bobbingwide commented 2 years ago

The optional upgrade logic that ensures only one option can be selected, when so configured, doesn't appear to work anymore. I don't yet know if this problem was caused by the bootstrap upgrade but re-opening to re-enable the JavaScript.

bobbingwide commented 2 years ago

The optional upgrade logic that ensures only one option can be selected, when so configured, doesn't appear to work anymore.

I've reverted to vgc v1.0.0 - it doesn't seem to work in that version either.

bobbingwide commented 2 years ago

The optional upgrade logic that ensures only one option can be selected, when so configured, doesn't appear to work anymore.

This is now a separate issue #41

In the most recent update ( v1.3.0 ) I commented out the enqueueing of the bootstrap.js. It seems to be working OK. Closing therefore.