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

Feature request: generate css for Bulma extensions #37

Closed
piever opened this issue May 21, 2018 · 3 comments
Closed

Feature request: generate css for Bulma extensions #37

piever opened this issue May 21, 2018 · 3 comments

Comments

@piever
Copy link

piever commented May 21, 2018

I find it very handy to have a version of a theme available as css using CDN but this has the issue that, when using a Bulma extension, the widgets from the extension don't get the new theme. I was wondering, if you're using some automated procedure to generate the bulmaswatch.min.css files, whether it would be possible to also generate css for the Bulma extensions (or show in the docs what's a procedure to do that).

@jenil
Copy link
Owner

jenil commented May 23, 2018

There is a build process to generate the bulmaswatch.min.css files but there is customization for each theme which needs manual CSS changes.

@piever
Copy link
Author

piever commented May 24, 2018

I managed to reproduce the css build step locally. It turns out that to include extensions in the theme, you can simply add (in your main.scss), after:

@import bulma

the required extensions, for example:

@import 'bulma-switch/dist/bulma-switch.sass';

If you don't mind the slightly increased css side that results from this, maybe it would even be possible to include these extensions by default in the theme css (or maybe to have two versions, extensions and no extensions).

However, while in some cases it works smoothly but in other cases there are unit measure conflicts. For example, if I compile Minty with the "toggle-switch" Bulma extension, I get:

sass styles/main.scss styles/main.css
Error: Incompatible units rem and px.
  $paddle-height: $switch-height - ($switch-paddle-offset * 2)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  vendors/bulma-extensions/bulma-switch/dist/bulma-switch.sass 14:19  switch-size()
  vendors/bulma-extensions/bulma-switch/dist/bulma-switch.sass 148:3  @import
  styles/main.scss 43:9                                               root stylesheet

I'm not sure if it's an issue with the theme or the extension. Maybe the theme is changing unit of measure of some bulma quantites?

@jenil
Copy link
Owner

jenil commented Aug 2, 2018

I think have CSS built for extensions separately only makes senses, so I'm going to this issue for now.

@jenil jenil closed this as completed Aug 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants