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

Update/retire remaining colors #25213

Merged
merged 13 commits into from
Sep 14, 2020
20 changes: 0 additions & 20 deletions packages/base-styles/_colors.scss
Original file line number Diff line number Diff line change
Expand Up @@ -22,23 +22,3 @@ $light-gray-placeholder: rgba($white, 0.65);
$alert-yellow: #f0b849;
$alert-red: #cc1818;
$alert-green: #4ab866;


/**
* Deprecated colors.
* Please avoid using these.
*/

$dark-gray-700: #32373c;
$dark-gray-600: #40464d;
$dark-gray-500: #555d66;
$dark-gray-400: #606a73;
$dark-gray-300: #6c7781;
$dark-gray-200: #7e8993;
$dark-gray-150: #8d96a0;
$dark-gray-100: #8f98a1;

$light-gray-900: #a2aab2;
$light-gray-800: #b5bcc2;
$light-gray-700: #ccd0d4;
$light-gray-600: #d7dade;
2 changes: 1 addition & 1 deletion packages/base-styles/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@
}

@mixin caption-style-theme() {
color: $dark-gray-500;
color: #555;
font-size: $default-font-size;
text-align: center;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
}

.block-directory-block-ratings__rating-count {
color: $dark-gray-400;
font-size: ms(-2);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@
}

.block-directory-compact-list__item-author {
color: $dark-gray-500;
color: $gray-700;
font-size: 11px;
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
.block-directory-downloadable-block-author-info__content {
color: $dark-gray-400;
font-size: 12px;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
display: flex;
align-items: center;
margin-bottom: 2px;
color: $dark-gray-400;
color: $gray-700;
font-size: 12px;
}

Expand All @@ -17,5 +17,5 @@

.block-directory-downloadable-block-info__icon {
margin-right: 4px;
fill: $dark-gray-400;
fill: $gray-700;
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
display: flex;
flex-direction: row;
font-size: $default-font-size;
color: $dark-gray-700;
color: $gray-900;
align-items: flex-start;
justify-content: center;
background: transparent;
Expand Down Expand Up @@ -57,5 +57,5 @@
}

.block-directory-downloadable-block-list-item__content {
color: $dark-gray-400;
color: $gray-700;
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
padding: $grid-unit-20;
margin: 0;
text-align: left;
color: $dark-gray-400;
color: $gray-700;
}

.block-directory-downloadable-blocks-panel__description.has-no-results {
Expand All @@ -13,7 +13,7 @@
padding: 0;
margin: $no-result-padding 0;
text-align: center;
color: $dark-gray-400;
color: $gray-700;
.components-spinner {
float: inherit;
}
Expand Down
2 changes: 1 addition & 1 deletion packages/block-editor/src/components/block-card/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
}

.block-editor-block-card__icon {
border: $border-width solid $light-gray-700;
border: $border-width solid $gray-200;
padding: 7px;
margin-right: 10px;
height: 36px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ $tree-item-height: 36px;
margin-top: auto;
margin-bottom: auto;
text-align: left;
color: $dark-gray-600;
color: $gray-900;
border-radius: 2px;
position: relative;

Expand Down Expand Up @@ -254,7 +254,7 @@ $tree-item-height: 36px;
top: 1px;
bottom: -2px;
right: -1px;
border-right: 2px solid $light-gray-900;
border-right: 2px solid $gray-600;
}

// If a vertical line has terminated, don't draw it.
Expand All @@ -275,7 +275,7 @@ $tree-item-height: 36px;
top: 26px;
left: 100%;
width: 5px;
border-bottom: 2px solid $light-gray-900;
border-bottom: 2px solid $gray-600;
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
flex-direction: column;
width: 100%;
font-size: $default-font-size;
color: $dark-gray-700;
color: $gray-900;
padding: $grid-unit-10;
align-items: stretch;
justify-content: center;
Expand Down
6 changes: 3 additions & 3 deletions packages/block-editor/src/components/inserter/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ $block-inserter-tabs-height: 44px;
}

&::placeholder {
color: $dark-gray-400;
color: $gray-700;
}

&::-webkit-search-decoration,
Expand Down Expand Up @@ -195,7 +195,7 @@ $block-inserter-tabs-height: 44px;
}

.block-editor-inserter__no-results-icon {
fill: $light-gray-800;
fill: $gray-600;
}

.block-editor-inserter__child-blocks {
Expand Down Expand Up @@ -254,7 +254,7 @@ $block-inserter-tabs-height: 44px;
justify-content: center;
align-items: center;
min-height: $grid-unit-60 * 3;
color: $dark-gray-400;
color: $gray-700;
background: $gray-100;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ $block-editor-link-control-number-of-actions: 1;

.block-editor-link-control__search-item-info {
display: block;
color: $dark-gray-300;
color: $gray-700;
font-size: 0.9em;
line-height: 1.3;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

.block-editor-responsive-block-control {
margin-bottom: $block-padding*2;
border-bottom: 1px solid $light-gray-600;
border-bottom: 1px solid $gray-400;
padding-bottom: $block-padding;

&:last-child {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
margin-bottom: -$grid-unit-15;
padding: $grid-unit-15 ($grid-unit-15 + $grid-unit-10);
border-top: 1px solid $gray-200;
color: $dark-gray-300;
color: $gray-700;
}
2 changes: 1 addition & 1 deletion packages/block-editor/src/components/url-input/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ $input-size: 300px;

.block-editor-url-input__suggestion {
padding: 4px $input-padding;
color: $dark-gray-300; // lightest we can use for contrast
color: $gray-700;
display: block;
font-size: $default-font-size;
cursor: pointer;
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/button/editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
}

.wp-block-button__inline-link {
color: $dark-gray-500;
color: $gray-700;
height: 0;
overflow: hidden;
max-width: 290px;
Expand Down
4 changes: 2 additions & 2 deletions packages/block-library/src/button/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ $blocks-button__height: 3.1em;
// to support the previous markup in addition to the new one.
.wp-block-button__link {
color: $white;
background-color: $dark-gray-700;
background-color: #32373c;
border: none;
border-radius: $blocks-button__height / 2;
box-shadow: none;
Expand Down Expand Up @@ -49,7 +49,7 @@ $blocks-button__height: 3.1em;

.is-style-outline .wp-block-button__link,
.wp-block-button__link.is-style-outline {
color: $dark-gray-700;
color: #32373c;
background-color: transparent;
border: 2px solid;
}
2 changes: 1 addition & 1 deletion packages/block-library/src/calendar/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@

table tbody,
table caption {
color: $dark-gray-600;
color: #40464d;
}
}
2 changes: 1 addition & 1 deletion packages/block-library/src/file/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
}

.wp-block-file__button {
background: $dark-gray-700;
background: #32373c;
border-radius: 2em;
color: $white;
font-size: 0.8em;
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/latest-posts/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
.wp-block-latest-posts__post-date,
.wp-block-latest-posts__post-author {
display: block;
color: $dark-gray-300;
color: #555;
font-size: 0.8125em;
}

Expand Down
4 changes: 2 additions & 2 deletions packages/block-library/src/more/editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
text-transform: uppercase;
font-weight: 600;
font-family: $default-font;
color: $dark-gray-300;
color: $gray-700;
border: none;
box-shadow: none;
white-space: nowrap;
Expand All @@ -41,6 +41,6 @@
top: calc(50%);
left: 0;
right: 0;
border-top: 3px dashed $light-gray-700;
border-top: 3px dashed $gray-400;
}
}
4 changes: 2 additions & 2 deletions packages/block-library/src/nextpage/editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
text-transform: uppercase;
font-weight: 600;
font-family: $default-font;
color: $dark-gray-300;
color: $gray-700;
border-radius: 4px;
background: $white;
padding: 6px 8px;
Expand All @@ -31,6 +31,6 @@
top: calc(50%);
left: 0;
right: 0;
border-top: 3px dashed $light-gray-700;
border-top: 3px dashed $gray-400;
}
}
8 changes: 4 additions & 4 deletions packages/block-library/src/pullquote/theme.scss
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
.wp-block-pullquote {
border-top: 4px solid $dark-gray-500;
border-bottom: 4px solid $dark-gray-500;
border-top: 4px solid #555;
Copy link
Contributor

Choose a reason for hiding this comment

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

Could these be currentColor since you define the color?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's a great thought, and I was going to implement it. However that makes this a bigger change — 555 is basically just a neutral gray version of the same color that was there before, which is very middle of the road gray. currentColor is going to be the same color as the text — which I agree it should be, because look:

.wp-block-pullquote {
	border-top: 4px solid #555;
	border-bottom: 4px solid #555;
	margin-bottom: 1.75em;
	color: #555;

	cite,
	footer,
	&__citation {
		color: #555;
		text-transform: uppercase;
		font-size: 0.8125em;
		font-style: normal;
	}
}

The body text is also gray. So it's not super arbitrary-background friendly.

But it also makes it a bigger change so I'm wondering if it shouldn't be a separate PR?

Copy link
Contributor

Choose a reason for hiding this comment

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

Separate PR works for me.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Followup here: #25358

border-bottom: 4px solid #555;
margin-bottom: 1.75em;
color: $dark-gray-600;
color: #555;

cite,
footer,
&__citation {
color: $dark-gray-600;
color: #555;
text-transform: uppercase;
font-size: 0.8125em;
font-style: normal;
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/quote/theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
cite,
footer,
&__citation {
color: $dark-gray-300;
color: #555;
font-size: 0.8125em;
margin-top: 1em;
position: relative;
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/rss/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@
.wp-block-rss__item-publish-date,
.wp-block-rss__item-author {
display: block;
color: $dark-gray-300;
color: #555;
font-size: 0.8125em;
}
4 changes: 2 additions & 2 deletions packages/block-library/src/search/editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
.wp-block-search__input,
&.wp-block-search__button-inside .wp-block-search__inside-wrapper {
border-radius: $radius-block-ui;
border: 1px solid $dark-gray-200;
border: 1px solid $gray-600;
color: $dark-gray-placeholder;
font-family: $default-font;
font-size: $default-font-size;
Expand All @@ -29,7 +29,7 @@
font-family: $default-font;
font-size: $default-font-size;
padding: 6px 10px;
color: $dark-gray-700;
color: #32373c;
}

&__components-button-group {
Expand Down
4 changes: 2 additions & 2 deletions packages/block-library/src/search/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
.wp-block-search__input {
flex-grow: 1;
min-width: 3em;
border: 1px solid $dark-gray-200;
border: 1px solid $gray-600;
}

.wp-block-search__button {
Expand All @@ -34,7 +34,7 @@

&.wp-block-search__button-inside .wp-block-search__inside-wrapper {
padding: $grid-unit-05;
border: 1px solid $dark-gray-200;
border: 1px solid $gray-600;

.wp-block-search__input {
border-radius: 0;
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/subhead/editor.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.edit-post-visual-editor p.wp-block-subhead {
color: $dark-gray-300;
color: #555;
font-size: 1.1em;
font-style: italic;
}
2 changes: 1 addition & 1 deletion packages/block-library/src/tag-cloud/editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
span {
display: inline-block;
margin-left: 5px;
color: $dark-gray-100;
color: $gray-700;
text-decoration: none;
}
}
2 changes: 1 addition & 1 deletion packages/components/src/button/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@
}

&:active:not(:disabled) {
background: $light-gray-600;
background: $gray-400;
}
}

Expand Down
Loading