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

Consistent SASS theme colors #693

Merged
merged 8 commits into from
May 30, 2017
Merged

Consistent SASS theme colors #693

merged 8 commits into from
May 30, 2017

Conversation

wmadden
Copy link
Contributor

@wmadden wmadden commented Apr 13, 2017

For some reason the foreground colors are set during preprocessing to fixed values, making it impossible to alter them using SASS variables. This PR replaces the generated constants with SASS expressions, making it possible to override them, and strips dead code from lib/angular-scss-filter.js.

@wmadden
Copy link
Contributor Author

wmadden commented Apr 25, 2017

@miguelcobain ping

@miguelcobain
Copy link
Collaborator

@wmadden sorry for the late reply. I had to do some changes to the filter and didn't know if they influenced this.
Can you please rebase and fix conflicts?

wmadden added 7 commits May 10, 2017 18:18
Previously the values were calculated when precompiling the SASS, e.g. `{{background-color}}` -> `color($background, ‘A100’)`, and the `’A1oo’` string would be hardcoded - unchangeable from SASS.

This commit removes that precompilation step, instead outputting `color($background)`, and adds logic to the SASS `color()` mixin to infer the default hue from the `$background` hash.
@wmadden
Copy link
Contributor Author

wmadden commented May 10, 2017

@miguelcobain done

@miguelcobain
Copy link
Collaborator

@wmadden
Copy link
Contributor Author

wmadden commented May 10, 2017 via email

@miguelcobain
Copy link
Collaborator

Here's an interesting regex AM itself is using: https://github.com/angular/material/blob/master/src/core/services/theming/theming.js#L889

@Falibur
Copy link

Falibur commented May 19, 2017

@wmadden hope that you will and can fix this 👍

@wmadden
Copy link
Contributor Author

wmadden commented May 24, 2017

@miguelcobain I've fixed the issue on this branch but unfortunately the build is broken due to this issue with Yarn and node-sass.

You've probably seen it before - locally it's fixed by running npm rebuild node-sass, after which the tests all pass. On CI it might be fixed by just rerunning the build and clearing the cache, I'm not sure, but you'll probably see the same failure on master.

@jklmli
Copy link

jklmli commented May 24, 2017

You can also add npm rebuild node-sass to CI after updating npm dependencies - this should fix it.

There a few suggestions floating around to add this to the postinstall script in package.json, but IIRC this was buggy in some situations (may have been fixed since).

They appeared in the recent `angular-material` changes
@wmadden
Copy link
Contributor Author

wmadden commented May 29, 2017

@miguelcobain looks like this issue is fixed in #709

@miguelcobain
Copy link
Collaborator

#709 is not ready to merge. It still has issues (only #705)

@miguelcobain
Copy link
Collaborator

I added the workaround for the yarn bug on master. This PR looks like it simplifies things a lot while providing more flexibility as well. 👍

@wmadden
Copy link
Contributor Author

wmadden commented May 29, 2017

Nice work @miguelcobain, looks like the build is passing now 👍

@Falibur
Copy link

Falibur commented May 30, 2017

Nice work you all 👍

@miguelcobain miguelcobain merged commit eb67d21 into adopted-ember-addons:master May 30, 2017
@v3ss0n
Copy link

v3ss0n commented May 30, 2017

Nice !!! that is awesome!

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

Successfully merging this pull request may close these issues.

5 participants