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

add !default to all SCSS variable declarations #337

Merged
merged 4 commits into from
Dec 9, 2016

Conversation

dmackerman
Copy link
Contributor

@dmackerman dmackerman commented Dec 8, 2016

Fixes #194

Checklist

  • Include tests N/A
  • Update documentation N/A

Changes proposed in this pull request:

  • Allow all of the variables defined to be overridden .

Reviewers should focus on:

  • Completeness

@palantirtech
Copy link
Member

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.

@adidahiya
Copy link
Contributor

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

Copy link
Contributor

@giladgray giladgray left a 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;
Copy link
Contributor

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.

Copy link
Contributor

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?

Copy link
Contributor

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';
Copy link
Contributor

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.

Copy link
Contributor

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;
Copy link
Contributor

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;
Copy link
Contributor

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

@llorca
Copy link
Contributor

llorca commented Dec 8, 2016

Missing files so far:

  • button/common
  • tag/common
  • slider/common
  • tooltip/common
  • all the common files for table

@dmackerman
Copy link
Contributor Author

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;
Copy link
Contributor

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

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

revert the !defaults 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
Copy link
Contributor

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

@giladgray
Copy link
Contributor

@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! 🎩

@dmackerman
Copy link
Contributor Author

@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.
Copy link
Contributor

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.

Copy link
Contributor Author

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.

@adidahiya
Copy link
Contributor

thanks @dmackerman

@adidahiya adidahiya merged commit 805c4c5 into palantir:master Dec 9, 2016
greglo pushed a commit to greglo/blueprint that referenced this pull request Dec 12, 2016
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.

None yet

5 participants