-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
add !default to all SCSS variable declarations #337
add !default to all SCSS variable declarations #337
Conversation
Thanks for your interest in palantir/blueprint, @dmackerman! Before we can accept your pull request, you need to sign our contributor license agreement - just visit https://cla.palantir.com/ and follow the instructions. Once you sign, I'll automatically update this pull request. |
I forsee a lot of stylelint failures. Here's what our config looks like https://github.com/palantir/stylelint-config-palantir/blob/master/stylelint.config.js |
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.
thanks for taking the time to put this together @dmackerman! looking great 💅
$sepia2: #7d5125 !default; | ||
$sepia3: #96622d !default; | ||
$sepia4: #b07b46 !default; | ||
$sepia5: #c99765 !default; |
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.
hmm i wonder if !default
is correct here. these colors are carefully calibrated and we shouldn't encourage mucking with them (consider them constants). instead, if you'd like to change colors you should change the aliases like $pt-text-color
.
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.
could add a comment to this effect at the top of this file?
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.
Agreed, wouldn't make sense to replace the value of $sepia1
with another color, it's already sepia.
@import "~bourbon/app/assets/stylesheets/bourbon"; | ||
@import "variables"; | ||
@import '~bourbon/app/assets/stylesheets/bourbon'; | ||
@import 'variables'; |
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.
we're all about double quotes over here. gonna fail stylelint until you revert all these quote changes.
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.
run gulp sass-lint
locally until it passes 👍
$sepia2: #7d5125 !default; | ||
$sepia3: #96622d !default; | ||
$sepia4: #b07b46 !default; | ||
$sepia5: #c99765 !default; |
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.
Agreed, wouldn't make sense to replace the value of $sepia1
with another color, it's already sepia.
// Default text selection color using #7dbcff | ||
$pt-text-selection-color: rgba(125, 188, 255, 0.6); | ||
$pt-text-selection-color: rgba(125, 188, 255, .6) !default; |
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.
Decimals start with 0
for clarity, I think the linter will give you trouble with this change
Missing files so far:
|
Thanks for the comments. I just realized that I had CSSComb auto formatting. I'll clean those up! 👍 |
$gold2: #bf8c0a !default; | ||
$gold3: #d99e0b !default; | ||
$gold4: #f2b824 !default; | ||
$gold5: #ffc940 !default; |
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.
wait not just sepia! every single variable in this file
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.
revert the !default
s and add a comment about changing colors: change aliases instead of these named constants.
sans-serif, | ||
"Icons16"; // support inline Palantir icons | ||
'Icons16' !default; // support inline Palantir icons |
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.
should be double quotes here
@dmackerman would you be able to enable CircleCI for your fork? should be approximately one button press (after you login to https://circleci.com). also would set you up to easily contribute more code in the future! 🎩 |
@giladgray just activated my fork on CircleCI. 👍 |
@@ -7,7 +7,8 @@ | |||
Color aliases | |||
|
|||
These variables are semantic aliases of our [colors](#colors). They are used throughout Blueprint itself to ensure | |||
consistent color usage across components. | |||
consistent color usage across components. Override these variables to change the overall look and feel for your | |||
application. |
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.
mm this sentence is more confusing than helpful. don't think it's necessary yet, please remove. we'll draw up more complete docs on sass consumption after this feature merges.
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.
Yeah, I kinda felt that way when writing it. People familiar with SASS should understand that if they see a list of variables, those are overridable.
thanks @dmackerman |
Fixes #194
Checklist
Include testsN/AUpdate documentationN/AChanges proposed in this pull request:
Reviewers should focus on: