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

text-hide() warning message #26237

Closed
arechsteiner opened this issue Apr 10, 2018 · 9 comments
Closed

text-hide() warning message #26237

arechsteiner opened this issue Apr 10, 2018 · 9 comments

Comments

@arechsteiner
Copy link
Contributor

arechsteiner commented Apr 10, 2018

When building the new 4.1 scss source code, I get the following warning message:

alex@ubuntuVM:~/code/bootstrap-41/scss$ scss bootstrap.scss  bootstrap.css
WARNING: The `text-hide()` mixin has been deprecated as of v4.1.0. It will be removed entirely in v5.
         on line 10 of mixins/_text-hide.scss, in `text-hide'
         from line 57 of utilities/_text.scss
         from line 14 of _utilities.scss
         from line 41 of bootstrap.scss

It seems text-hide() ist still used in https://github.com/twbs/bootstrap/blob/v4.1.0/scss/utilities/_text.scss#L57

@arechsteiner arechsteiner changed the title text-hide() error message text-hide() warning message Apr 10, 2018
@XhmikosR
Copy link
Member

XhmikosR commented Apr 10, 2018

Yes, but it's deprecated; that is the whole point of the warning message. :)

/CC @mdo

@arechsteiner
Copy link
Contributor Author

I feel like the vanilla Bootstrap source code shouldn't spawn warning messages about itself.

I have some projects where I build custom versions of Bootstrap and they all spawn warnings now even though I'm not using text-hide() and am perfectly innocent. 😇

@XhmikosR
Copy link
Member

XhmikosR commented Apr 10, 2018 via email

@arechsteiner
Copy link
Contributor Author

arechsteiner commented Apr 10, 2018

One solution I can think of:

Mixin:

@mixin text-hide($ignoreWarning: false) {
  ...
  @if ($ignoreWarning == false) {
    @warn "The `text-hide()` mixin has been deprecated as of v4.1.0. It will be removed entirely in v5.";
  }
}

Usage in _text.scss

.text-hide {
  @include text-hide(true);
}

This will spawn a warning for normal use of text-hide() but gives the option to suppress the warning.

@XhmikosR
Copy link
Member

XhmikosR commented Apr 10, 2018 via email

@arechsteiner
Copy link
Contributor Author

Will do, give me half an hour.

@arechsteiner
Copy link
Contributor Author

Done here: #26242

@TheSharpieOne
Copy link

TheSharpieOne commented Apr 12, 2018

Usually when there is a deprecation warning about something going to be remove, the package itself doesn't use that thing. Typically I see the package migrating to the new preferred usage, and others can use that commit as an example way to migrate any of their own usage.
It seems like bootstrap is planning on removing something and are not quite sure what to do when it gets removed. Leaving others to determine that for themselves and also warning them that bootstrap will break itself in the next version unless bootstrap takes additional action (which they obviously will and really doesn't make any sense to tell the user).

jimmay5469 added a commit to blockscout/blockscout that referenced this issue Apr 16, 2018
Currently there is a deprecation warning when running `mix phx.server`
trown from within bootstrap itself. This is expected behavior. To find
out more see twbs/bootstrap#26237.

Co-authored-by: tmecklem <timothy@mecklem.com>
@Merovex
Copy link

Merovex commented Apr 18, 2018

I just commented out the warning...since I don't use the feature. ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants