knownasilya / ember-toggle

Checkbox based Toggle Switches for Ember
http://knownasilya.github.io/ember-toggle/
MIT License
112 stars 52 forks source link

Conditional styles importing #60

Closed lancedikson closed 7 years ago

lancedikson commented 7 years ago

Looks like there are some cases when you want a customized toggle and don't need those default styles. Is it suitable to make them importable optionally like add @import 'ember-cli-toggle' to the app.css?

knownasilya commented 7 years ago

Sure, as long as that is set by default.

lancedikson commented 7 years ago

@knownasilya, I have a good example of that practice — ember-power-select, but they do it with adding some complexity to addon's release process. They just have some ember release command that precompiles all sass to vendor's CSS, creates a new minor version of the addon and push it, I guess. But, it's cool that this way has backward compatibility and doesn't push people to install Sass to have any styles. What do you think? Is it comfortable to have a complicated way to release?

knownasilya commented 7 years ago

We already do that, see https://github.com/knownasilya/ember-cli-toggle/blob/master/index.js#L36

lancedikson commented 7 years ago

But base.css includes anyway without any condition, right?

knownasilya commented 7 years ago

Yeah, we could add a property to exclude it, e.g. excludeBaseStyles: true.

lancedikson commented 7 years ago

Sounds good 👍

knownasilya commented 7 years ago

This is a thing in v3.0.0.