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

New color system #4426

Merged
merged 8 commits into from
Jan 1, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
update more tint/shade to colorPalette
  • Loading branch information
afc163 committed Dec 30, 2016
commit 6eb7b205b7ee61f88aad8709fdba42d388b81ed5
5 changes: 2 additions & 3 deletions components/button/style/mixin.less
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 21,14 @@

.button-variant-primary(@color; @background) {
.button-color(@color; @background; @background);

&:hover,
&:focus {
.button-color(@color; tint(@background, 20%); tint(@background, 20%));
.button-color(@color; ~`colorPalette("@{background}", 5)`; ~`colorPalette("@{background}", 5)`);
}

&:active,
&.active {
.button-color(@color; shade(@background, 5%); shade(@background, 5%));
.button-color(@color; ~`colorPalette("@{background}", 7)`; ~`colorPalette("@{background}", 7)`);
}

.button-disabled();
Expand Down
4 changes: 2 additions & 2 deletions components/input/style/mixin.less
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 16,14 @@
// input status
// == when focus or actived
.active(@color: @outline-color) {
border-color: tint(@color, 20%);
border-color: ~`colorPalette("@{color}", 5)`;
outline: 0;
box-shadow: 0 0 @outline-blur-size @outline-width fade(@color, 20%);
}

// == when hoverd
.hover(@color: @input-hover-border-color) {
border-color: tint(@color, 20%);
border-color: ~`colorPalette("@{color}", 5)`;
}

.disabled() {
Expand Down
11 changes: 0 additions & 11 deletions components/style/color/colors.less
Original file line number Diff line number Diff line change
Expand Up @@ -88,14 88,3 @@
@yellow-8: color(~`colorPalette("@{yellow-6}", 8)`);
@yellow-9: color(~`colorPalette("@{yellow-6}", 9)`);
@yellow-10: color(~`colorPalette("@{yellow-6}", 10)`);

@gray-1: color(~`colorPalette("@{gray-6}", 1)`);
@gray-2: color(~`colorPalette("@{gray-6}", 2)`);
@gray-3: color(~`colorPalette("@{gray-6}", 3)`);
@gray-4: color(~`colorPalette("@{gray-6}", 4)`);
@gray-5: color(~`colorPalette("@{gray-6}", 5)`);
@gray-6: #c0c0c0;
@gray-7: color(~`colorPalette("@{gray-6}", 7)`);
@gray-8: color(~`colorPalette("@{gray-6}", 8)`);
@gray-9: color(~`colorPalette("@{gray-6}", 9)`);
@gray-10: color(~`colorPalette("@{gray-6}", 10)`);
6 changes: 3 additions & 3 deletions components/style/themes/default.less
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 9,7 @@
@error-color : @red-6;
@highlight-color : @red-6;
@warning-color : @yellow-6;
@normal-color : @gray-3;
@normal-color : #d9d9d9;

@primary-1: color(~`colorPalette("@{primary-color}", 1)`); // replace tint(@primary-color, 90%)
@primary-2: color(~`colorPalette("@{primary-color}", 2)`); // replace tint(@primary-color, 80%)
Expand Down Expand Up @@ -61,8 61,8 @@
@ease-in-out-quint : cubic-bezier(0.86, 0, 0.07, 1);

// Border color
@border-color-base : @gray-5; // base border outline a component
@border-color-split : @gray-4; // split border inside a component
@border-color-base : #d9d9d9; // base border outline a component
@border-color-split : #e9e9e9; // split border inside a component

// Outline
@outline-blur-size : 0;
Expand Down