bootstrap-dark icon indicating copy to clipboard operation
bootstrap-dark copied to clipboard

Variables should be affixed with `!default` in case custom overrides.

Open titanism opened this issue 2 years ago • 5 comments

e.g. if a user wants to use a custom $blue value in dark mode

https://github.com/ForEvolve/bootstrap-dark/blob/master/scss/_dark-variables.scss

titanism avatar Feb 10 '23 17:02 titanism

I can't remember why I did not add the !default suffix; maybe it does not work as one would expect because Bootstrap already defines that suffix, and the dark variables are already overriding them... To be validated.

That said, feel free to validate if it works, and if so, let me know and/or open a PR.

TBH, I'm pretty busy with work atm, and I don't think I'll have the opportunity to review this for a while; your help would be most appreciated.

Carl-Hugo avatar Feb 12 '23 02:02 Carl-Hugo

Couldn't we just move @import 'dark-variables' to before @import 'node_modules/bootstrap/scss/variables'; and affix all the vars with !default?

titanism avatar Feb 12 '23 04:02 titanism

Will open a PR and test it out now if it works

titanism avatar Feb 12 '23 04:02 titanism

Tested and seems to work OK. See https://github.com/ForEvolve/bootstrap-dark/pull/64.

Can you merge and release a new major or minor version to npm? This is breaking so at the minimum do a minor version release, if not a major for safety.

titanism avatar Feb 12 '23 05:02 titanism

Just an update - that PR is broken and should not be merged. We'll try to find time to dive in that again in the near future.

titanism avatar Feb 22 '23 06:02 titanism