Uswds: Bourbon deprecation warnings from scss import

Created on 27 Apr 2017  路  4Comments  路  Source: uswds/uswds

Description

I'm using the web design standards source in my jekyll site. Unfortunately with uswds-1.1.0, I get a handful of Bourbon deprecation warnings. It's confusing because I would only expect to see warnings if I'm doing something wrong, but in this case it's actually uswds. It causes extra noise for using the web design standards.

Not sure if there's a way to turn it off, but it would be nice if uswds could disable the warnings so downstream users don't get confused by this.

Steps to reproduce the issue

  1. @import "../node_modules/uswds/src/stylesheets/all.scss";
  2. jekyll build

There's 16 warnings total, but most of them look like duplicates.

WARNING: [Bourbon] [Deprecation] `rem` is deprecated and will be removed in 5.0.0.
         on line 7 of /home/adborden/projects/foia/foia-jekyll/node_modules/uswds/src/stylesheets/lib/functions/_px-to-rem.scss
         from line 9 of /home/adborden/projects/foia/foia-jekyll/node_modules/uswds/src/stylesheets/uswds.scss
         from line 1 of /home/adborden/projects/foia/foia-jekyll/node_modules/uswds/src/stylesheets/_all.scss
         from line 2 of /home/adborden/projects/foia/foia-jekyll/_sass/_uswds.scss
         from line 3 of an unknown file

WARNING: [Bourbon] [Deprecation] `transition` is deprecated and will be removed in 5.0.0. We suggest using an automated prefixing tool, like Autoprefixer.
         on line 10 of /home/adborden/projects/foia/foia-jekyll/node_modules/uswds/src/stylesheets/lib/_bourbon-deprecate.scss, in `_bourbon-deprecate'
         from line 17 of /home/adborden/projects/foia/foia-jekyll/node_modules/uswds/src/stylesheets/lib/_bourbon-deprecate.scss, in `_bourbon-deprecate-for-prefixing'
         from line 7 of /home/adborden/projects/foia/foia-jekyll/node_modules/uswds/src/stylesheets/lib/css3/_transition.scss, in `transition'
         from line 69 of /home/adborden/projects/foia/foia-jekyll/node_modules/uswds/src/stylesheets/components/_navigation.scss
         from line 37 of /home/adborden/projects/foia/foia-jekyll/node_modules/uswds/src/stylesheets/uswds.scss
         from line 1 of /home/adborden/projects/foia/foia-jekyll/node_modules/uswds/src/stylesheets/_all.scss
         from line 2 of /home/adborden/projects/foia/foia-jekyll/_sass/_uswds.scss
         from line 3 of an unknown file
minor devops sass bug

Most helpful comment

@adborden you can turn it off with $output-bourbon-deprecation-warnings: false !default; fyi

Seems like it should be turned off with Bourbon v4.3.2 https://github.com/lacroixdesign/node-bourbon/issues/37 not sure what uswds is using.

All 4 comments

Yeah, this is super annoying. I tried disabling them to no avail. See also: #1046 #1555

@adborden you can turn it off with $output-bourbon-deprecation-warnings: false !default; fyi

Seems like it should be turned off with Bourbon v4.3.2 https://github.com/lacroixdesign/node-bourbon/issues/37 not sure what uswds is using.

Hmm, USWDS's package.json says it wants bourbon version ^4.2.6, and that caret means that it should use the latest minor version. Indeed, on my local checkout it's using 4.3.4, but these deprecation warnings are still being logged.

Hmm, so it looks like that issue @maya referenced is only relevant when SASS that doesn't actually use any of bourbon's deprecated methods is compiled. In USWDS's case, however, we are using some of those deprecated methods: according to a GitHub search for rem we're using the deprecated rem() function in _variables.scss and _inputs.scss, for example. So it makes sense that those deprecation warnings are being logged.

What should we do about it? It's really spamming up my development workflow, unfortunately... I've put $output-bourbon-deprecation-warnings: false !default; in my uswds.scss for now, but I'm afraid of accidentally committing it.

It seems like we have a few options here:

  1. Just commit the $output-bourbon-deprecation-warnings: false !default; hack for now, but include a comment that mentions that it's just a temporary fix, with a link back to this issue. Then whenever this issue gets resolved, the PR will need to also include code that removes the hack.

  2. Fix all the deprecation warnings by using whatever the recommended fix is. I have no idea what the recommended fix is for our warnings, though, as I'm new both to USWDS and Bourbon, so I don't think I'd be a good candidate for this solution...

Any other thoughts?

@toolness short-term you can move the rem() function to the custom utilities file, and upgrade bourbon. Longterm, decide whether the rem() function is needed or not, i.e. remove if it's not needed. But you might want to explore typography and font sizes more generally and systematically as well, like how robust is it, how does it impact other code bases, how easy is it to change, does it work as expected, etc.

Was this page helpful?
0 / 5 - 0 ratings