Bootstrap: [v4.3] Including mixins multiple times shouldn't warn about RFS

Created on 11 Feb 2019  路  4Comments  路  Source: twbs/bootstrap

Hi everyone, I'm opening this issue after a quick talk with @MartijnCuppens here : https://github.com/twbs/rfs/pull/50#issuecomment-462481420

Before 4.3.0, importing ~bootstrap/scss/mixins multiple times was ok, but now we get a warning :

WARNING: Watch out, RFS is included more than once!

Warning comes from scss/vendor/_rfs.scss imported in scss/_mixins.scss

In my opinion bootstrap should not warn for this, especially as there's no warning of that kind elsewhere (so doing it only for _mixins.scss seems weird, as at the end it won't generate any duplicated css).

Feel free to read my comment to rfs project for more details.

I'd be pleased to make a PR removing this warning, though as it's vendor/_rfs maybe we should do it in https://github.com/twbs/rfs instead.

Let me know, and have a good day guys 馃憢

css

Most helpful comment

This functionality was originally added because RFS broke if it was included more than once. That's fixed in the meanwhile but I build in this warning to warn people if RFS was included multiple times in their config because they're probably doing something wrong. In the scope of RFS this is quite a handy feature, but a lot of people will not know what RFS is when they include Bootstrap.

Guess I'm just going to remove it, it was more a nice-to-have feature but if it confuses more than it helps, it's moot.

I'll make PRs in both repos.

All 4 comments

@MartijnCuppens This is an update for RFS and not Bootstrap itself, correct? Or should we aim to develop RFS here and publish changes back to the main repo? (Let's figure that out and document it on our side for future reference.)

I think it makes more sense to make any changes upstream first and then update it here.

If including rfs multiple times is such a bad practice maybe it should be be decoupled from mixins.scss?

This functionality was originally added because RFS broke if it was included more than once. That's fixed in the meanwhile but I build in this warning to warn people if RFS was included multiple times in their config because they're probably doing something wrong. In the scope of RFS this is quite a handy feature, but a lot of people will not know what RFS is when they include Bootstrap.

Guess I'm just going to remove it, it was more a nice-to-have feature but if it confuses more than it helps, it's moot.

I'll make PRs in both repos.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

steve-32a picture steve-32a  路  3Comments

eddywashere picture eddywashere  路  3Comments

devdelimited picture devdelimited  路  3Comments

knownasilya picture knownasilya  路  3Comments

ghost picture ghost  路  3Comments