Morten Sæther

← Blog

Custom CSS Framework Integration

#23 · 1 August 2026

Living with the Bootstrap you inherited, and deciding whether to replace it

Power Pages ships with Bootstrap underneath, and which version you get depends on the template you picked when you created the site. That decision is now yours to live with.

This is the constraint that makes CSS on this platform different from CSS anywhere else: the list component, the entity form, the navigation - they all render Bootstrap markup you don’t control. You’re not styling your own HTML. You’re styling someone else’s, and it can change under you at the next platform update.

Step by step

1. Find out what you’re running

Before you write a line of CSS, check which Bootstrap version your site runs. Power Pages supports 3.3.6 and 5; open the bootstrap.min.css web file to see which one you have. Bootstrap 3 and 5 name things differently enough that guessing wrong wastes an afternoon.

Write it down somewhere. This is the most useful fact about your portal’s frontend.

2. Decide how far you’re going

Three positions:

Work with it. Use the Bootstrap that’s there, add your own layer on top for brand and layout. Lowest risk, and platform updates mostly leave you alone.

Extend it. Keep Bootstrap for the components Power Pages renders, add a utility layer or a framework of your own for the pages you build yourself. This is where most serious portals end up.

Replace it. Bring in Tailwind or something else and neutralise the built-in styles. Microsoft says not to: lists, forms and other platform components depend on Bootstrap. If you want Tailwind, keep Bootstrap in place and run Tailwind as an isolated supplement on the pages you build yourself.

I’d start at the first and move to the second when it stops being enough. The third isn’t really on the table.

3. Layer your own styles on top

The load order is fixed: bootstrap.min.css, then theme.css, then your custom CSS files, then portalbasictheme.css last. Your layer sits between the theme and the platform’s base theme, so for anything portalbasictheme.css also sets you need a more specific selector, not just a later file. Use the Styling workspace for what it covers and custom CSS for the rest.

Scope your own components under a namespace class so they can’t collide with platform markup. It costs one extra class and saves you from mystery breakage.

4. Keep the platform components working

Style what’s rendered, don’t restructure it. If you find yourself moving elements around with JavaScript after the page loads, or overriding display on something Power Pages generated, you’re building something that will break silently at the next update.

Test forms and lists after every significant CSS change. Those are where breakage hides - a mangled validation message or an unreachable button won’t show up on the pages you’re looking at.

5. Handle the update problem

Platform updates can change generated markup. Reduce the blast radius:

How to make a mess and fix it

A component looks broken after an update. Your selector was tied to markup that changed. Find it in your override file - which is why they’re all in one place.

Your styles work everywhere except inside forms. Entity forms render into their own structure with higher specificity than you’d expect. Scope more precisely rather than reaching for !important.

Two frameworks fighting. Something is being loaded twice, or a reset is running after your styles. Check the load order in the network tab rather than assuming.

Wrapping up

You’re a guest in someone else’s markup. Layer on top rather than fighting the base, keep overrides collected and commented, and test the platform components after every change.

Next: configuration-driven forms, and generating them instead of building them one at a time.