Foundry and Bootstrap

So pretty new to RW8/Stacks/Foundry. I am trying to get some of the under the hood stuff figured out. It looks to me like for each page I create a Bootstrap file is created with a titling scheme like "stacks_page_pagex.css with a corresponding js file “stacks_page_pagex.js”. As I look at these files it appears that Foundry is working off of Bootstrap v4.0.0 alpha.2 I’ve been adding some custom HTML into an HTML stack (hand coding some forms as I haven’t yet found a form generator that is flexible enough for what I’m after.) Anyway, I’m pretty comfortable with coding the forms but I keep running into a cement wall as I attempt to use bootstrap classes that are part of v4.1+ releases and, therefore, are not coded into the Foundry generated bootstrap file. Right now my issue is with form-check related classes. I finding this a bit frustrating. My current workaround is either to also add in the Bootstrap v4.3.1 css file or copy and paste the classes I need from the Bootstrap file into my own css files. Both of these feel really kludgy and make me feel like I don’t really get how all of this (i.e., Rapidweaver → Stacks → Foundry) is supposed to work. I would appreciate if someone can give me some insights as to what I’m missing and/or useable workarounds. Thanks.

Welcome to the community!

It’s a bit deeper than that even. Foundry is based off of Bootstrap v4 alpha, but it also has a LOT of customizations beyond that related specifically to Foundry itself. So it is its own one-off version of the framework.

That is due to the fact that Bootstrap decided to change a large majority of their naming conventions between the alpha and beta versions. They’d said at the outset during the creation of v4 that much would change code-wise during development, but they never alluded to the classes, IDs, etc changing. But, they pretty much completely changed them between the two releases.

This is unfortunate, but Foundry’s internal version of BS v4 is pretty custom at this juncture, so even if those classes were the same we’d have still ventured off from their base BS design.

That will not only be “kludgy” it will also be a waste of resources as you’re adding double the amount of code to the page, but it may also cause you problems as some of the classes and IDs remained the same between alpha and beta version of BS but their code changed from what I’m using… so in other words you’ll have problems with Foundry if do that as you’d be overriding what Foundry expects fun its own code base.

If you need a form you can use the Form stack that comes with Foundry, or if you’re looking for an advanced form you can use the Form Pro stack that is a part of the Potion Pack of addons for Foundry. Form Pro allows for customization of fields and adding in different types of fields, where the standard Form stack is meant as a basic contact form that most users will find sufficient.

Foundry is meant to work modularly with the stacks it provides and not as a base for hand coding on top of. You can hand code on top of it like you’re trying to do, but you’ll have to dig into Foundry’s SCSS files inside of Foundry (or the exported CSS files) to use the proper classes and IDs that Foundry uses.

Hope that helps.

Thank you for the response. That helps a great deal and makes a lot of sense. I’ll try to take a look at the Form Pro in the Potion Pack and see if that will get me where I’m wanting to go.

1 Like

No problem at all. If you have questions let me know.