Improvements for Popper JS implementation
-
1)
This CSS should be added to all this theme’s styling:h3.popover-header { margin-top: 0; }
30 second video demonstration: https://share.getcloudapp.com/X6uD0von
2)
You should only load Popper JS via a separate Customizer setting because I found it’s not usable without custom JS to add its selector. So why load it by default if it’s likely not used by default?So, if the Customizer setting is enabled, then load the JS and implement global usage:
$('[data-toggle="popover"]').popover()
— from https://getbootstrap.com/docs/4.1/components/popovers/#example-enable-popovers-everywhereAnd, if this Customizer setting is enabled,
wp-bootstrap-starter-bootstrapjs
script should havewp-bootstrap-starter-popper
as a dependency, per https://getbootstrap.com/docs/4.1/components/popovers/#overview3)
It would be helpful to document on your site or in readme or the Customizer option how to use/implement Popper JS within your theme, such as by adding the data-toggle or some custom class, whatever you decide the selector should be.
- The topic ‘Improvements for Popper JS implementation’ is closed to new replies.