-
-
Notifications
You must be signed in to change notification settings - Fork 874
Conversation
3885f64
to
d4b1a64
Compare
8465a83
to
9ba0b5e
Compare
@charset "UTF-8"; | ||
|
||
/// Throws Sass warnings to announce library deprecations. People can disable | ||
/// these using the `$disable-bourbon-deprecation-warnings` variable. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about:
/// these by setting the `$disable-bourbon-deprecation-warnings` variable to `true`.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is also something funny to me about the double negative here. What if we were to name the variable show-bourbon-deprecation-warnings
or output-bourbon-deprecation-warnings
or something that will get us to a place where we are more direct with false
turning it off, and true
turning it on.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, great point. I debated this because this current language aligns with Neat’s implementation (suite consistency), but the double negative is indeed a bummer. output-bourbon-deprecation-warnings
is much more clear and straightforward.
Whew that was a long one. Code looks good. I have a particular comment about the double negative variable |
Thanks, @jasonramirez! |
9ba0b5e
to
c80b557
Compare
This borrows heavily from how we deprecate features in Neat using Sass @warn: thoughtbot/neat@5c337cc One key difference from Neat is that we only want to use this mixin for deprecations, not all warnings. The reason is because with CSS, it's not always a straightforward task to upgrade libraries or frameworks; particularly major releases. So we offer a toggle to globally disable deprecation warnings, but for other meaningful warnings we need to throw, we still output those. To deprecate a feature, you include the `_bourbon-deprecate` mixin to throw a Sass warning, providing a detailed message that gives context. We offer a variable to allow people to disable deprecation warnings from being output. One problem with this system is that we cannot use these deprecation mixins to deprecate a function. This is because Sass doesn't allow you to include a mixin in a function. For now, since we only have a few functions up for deprecation, we can live with this and manually write warnings for those.
Add deprecation warnings for features that will be removed or changed in 5.0.0. For more information on why most of these features are being removed, see: #702
c80b557
to
fc9d1ee
Compare
In case anyone else got confused, the pull request description says:
But the actual code has:
|
Introduce remaining deprecation warnings for features that are removed in 5.0.0.
This borrows heavily from how we deprecate features in Neat using Sass
@warn
: thoughtbot/neat@5c337ccOne key difference from Neat is that we only want to use this mixin for
deprecations, not all warnings. The reason is because with CSS, it's not always
a straightforward task to upgrade libraries or frameworks; particularly major
releases. So we offer a toggle to globally disable deprecation warnings, but for
other meaningful warnings we need to throw, we still output those.
People can disable deprecation warnings by setting a variable to
false
:$disable-bourbon-deprecation-warnings: true;
One problem with this system is that we cannot use these deprecation mixins to
deprecate a function. This is because Sass doesn't allow you to include a mixin
in a function. For now, since we only have a few functions up for deprecation,
we can live with this and manually write warnings for those.
The plan is to merge this and release it as a
4.3
release to solely introducethese warnings.