jbonfardeci / ShockoutForms

SharePoint + Knockout MVVM forms - an InfoPath killer
32 stars 8 forks source link

CSS dependencies #3

Closed leolorenzoluis closed 8 years ago

leolorenzoluis commented 8 years ago

This is not an issue but a question, is bootstrap a dependency for ShockOut? I'd want to use Material Design Lite on top of ShockOut without having to restyle your entire css.

bnsc commented 8 years ago

I believe the framework will function without bootstrap. There are templates within the framework that set up form fields automatically. These templates are built using Bootstrap styles. You can customize these templates to fit your needs. I'm new to Material Design LIte, so my thoughts may not be that useful to you.

The templates reside in j_templates.ts or in the .js file between lines 3289 and 3307.

Also note, since Bootstrap was used as the style basis for this framework, you will find some features lean on the Bootstrap styles. For example, field validation uses Bootstrap styles.

Thanks, Bill

bnsc commented 8 years ago

I found a github repo with a Material Design for Bootstrap. Maybe that is useful to you in this case?

Thanks, Bill

leolorenzoluis commented 8 years ago

Hi Bill,

I used Material Design for Bootstrap before, but I wanted to use a super light weight CSS. So my branding really revolves now with just MDL instead of Bootstrap.

A solution could be to provide a css class to the template controls, and if it is empty then use bootstrap style?

jbonfardeci commented 8 years ago

I have many new features planned for Shockout including a code generator. I had also considered providing options for BYOCSS classes for the rows, columns, and fields. Just this week I finished a new lightweight form validation plugin just for Knockout observables that will further decouple Shockout from Bootstrap CSS and bring this new feature closer to fruition. I will bump up the priority for this feature and begin work on version 1.7 this week. Thank you for posing the question. It's these types of questions and input that will drive me to make Shockout more relevant to the community. Thanks.

leolorenzoluis commented 8 years ago

@bnsc I tried using Material Design for Bootstrap. However, correct me if I'm wrong but it looks like I have to update the so-x templates in order to comply with its css?

jbonfardeci commented 8 years ago

The words “light weight” and “SharePoint" are in contradiction.

On Feb 27, 2016, at 12:34 PM, leolorenzoluis notifications@github.com wrote:

Hi Bill,

I used Material Design for Bootstrap before, but I wanted to use a super light weight CSS. So my branding really revolves now with just MDL instead of Bootstrap.

A solution could be to provide a css class to the template controls, and if it is empty then use bootstrap style?

— Reply to this email directly or view it on GitHub https://github.com/jbonfardeci/ShockoutForms/issues/3#issuecomment-189699925.