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

When trying to import fonts SCSS file it complains about missing $color-base-white variable #33

Closed
johnvoelk opened this issue Feb 27, 2020 · 5 comments
Assignees
Labels
Type: Bug Bug or Bug fixes

Comments

@johnvoelk
Copy link

Describe the bug
In one of our SCSS files, attempt to import the fonts and receive the following error:

SassError: Undefined variable: "$color-base-white".
on line 44 of node_modules/@alaskaairux/orion-web-core-style-sheets/dist/utilityMixins/_focusVisible.scss, in mixin focus-hyperlink
from line 123 of node_modules/@alaskaairux/orion-web-core-style-sheets/dist/_essentials.scss
from line 3 of /Users/jvoelk/git/Ryoko/Site/src/App.scss

$color: $color-base-white;

To Reproduce
Steps to reproduce the behavior:

  • Start webpack to existing React project
  • Add the following lines to an SCSS file:
@import "~@alaskaairux/orion-design-tokens/dist/tokens/SCSSVariables";
@import "~@alaskaairux/orion-web-core-style-sheets/dist/essentials";
@import "~@alaskaairux/orion-web-core-style-sheets/dist/fonts";
  • Save the file

Expected behavior
A clear and concise description of what you expected to happen.

Should result in no errors.

@johnvoelk johnvoelk added the Type: Bug Bug or Bug fixes label Feb 27, 2020
@blackfalcon
Copy link
Member

If I am understanding this correctly, you are using the deprecated focus-hyperlink() mixin ref, but only importing the new Auro SCSSVariables.

My suggestion is to use the newer auro_focus-hyperlink ref as this has the correct dependency on the new Auro tokens.

Please see the Auro Tokens pre-processed output for full descriptions.

The other option is to reference the deprecated _TokenVariables as this will have the $color-base-white reference needed. But that seems counter productive.

@johnvoelk
Copy link
Author

As an ignorant React developer I am not aware that I was choosing to use deprecated features. All of the SCSS files that I am importing are not deprecated.

How do I use the newer auro_focus-hyperlink ref? Sorry this isn't obvious to me.

@geoffrich
Copy link
Contributor

Essentials imports the deprecated focus-hyperlink() mixin by default: https://github.com/AlaskaAirlines/OrionWebCoreStyleSheets/blob/master/src/_essentials.scss#L8. Does essentials needs to be updated to only import the new hyperlink mixin instead? As you said, it seems counter-productive to require import of the old tokens.

@blackfalcon
Copy link
Member

Got it! This is the real issue
https://github.com/AlaskaAirlines/OrionWebCoreStyleSheets/blob/master/src/_essentials.scss#L123

Ok, this can be fixed quickly.

@blackfalcon blackfalcon added Status: Approved for work Status: Work In Progress Issue or Pull Request work is in Progress labels Feb 28, 2020
AuroDesignSystem pushed a commit that referenced this issue Feb 28, 2020
## [2.8.11](v2.8.10...v2.8.11) (2020-02-28)

### Bug Fixes

* [#33](#33) incorrect reference to deprecated mixin ([00d2c23](00d2c23))
@AuroDesignSystem
Copy link
Collaborator

🎉 This issue has been resolved in version 2.8.11 🎉

The release is available on:

Your semantic-release bot 📦🚀

@blackfalcon blackfalcon removed Status: Work In Progress Issue or Pull Request work is in Progress Status: Ready to Merge labels Feb 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Bug or Bug fixes
Projects
None yet
Development

No branches or pull requests

4 participants