Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Q: Can I completely replace the sylesheet? Trying to use bootstrap #97

Open
thondeboer opened this issue Sep 6, 2023 · 2 comments
Open
Assignees
Labels
enhancement New feature or request wip Work in progress

Comments

@thondeboer
Copy link

I am trying to change the look and feel of my app to use bootstrap, but adding bootstrap CSS to the /static directory only allows me partial changing the style of the components.

THis is likely due to what you describe here: https://www.streamsync.cloud/stylesheets.html#tips-for-effective-stylesheets in that it is not using the important flag, but does that mean we are always going to have to make our own stylesheet and cannot use existing ones, like bootstrap for streamsync apps?

@ramedina86
Copy link
Collaborator

Yes, the expectation is for CSS classes to be created ad-hoc and used sparingly to alter small details. For example, apply rounded corners to Image.

I think your experience isn't going to be great if you apply Bootstrap to any prebuilt components. That applies to Streamsync and to any other framework that uses prebuilt components.

The only way for Bootstrap to reliably work is to create raw HTML elements that align with what Bootstrap expects. The main reason is that most of the time you'll be dealing not with raw HTML elements but with complex trees of HTML elements.

The issue you mentioned does complicate things, since style fields configurable by Builder use the style attribute of HTML elements, which has higher specificity, so things like background or color do get lost unless flagged with !important.

@ramedina86 ramedina86 added the enhancement New feature or request label Jan 25, 2024
@ramedina86
Copy link
Collaborator

Hi, I'll be looking at ways to get around this limitation using Vue's SFC CSS binding

@FabienArcellier My idea is to replace the computed rootStyle and such to the v-bind in CSS, so as to have the styles have lower specificity thus not needing !important for overriding in custom stylesheets.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request wip Work in progress
Projects
None yet
Development

No branches or pull requests

3 participants