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

Remove duplicate SCSS rules, merge (consecutive) identical selectors. #14520

Merged
merged 2 commits into from
Apr 24, 2019
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
1 change: 0 additions & 1 deletion packages/block-editor/src/components/block-list/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -984,7 +984,6 @@
top: (($block-padding * -2) - $block-left-border-width);

.components-toolbar {
padding: 0;
border: none;
line-height: 1;
font-family: $default-font;
Expand Down
1 change: 0 additions & 1 deletion packages/block-library/src/block/edit-panel/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
top: -$block-padding;
margin: 0 (-$block-padding);
padding: $grid-size $block-padding;
position: relative;

// Use opacity to work in various editor styles.
border: $border-width dashed $dark-opacity-light-500;
Expand Down
5 changes: 1 addition & 4 deletions packages/block-library/src/legacy-widget/editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
.widget-inside {
border: none;
display: block;
box-shadow: none;
}
}

Expand All @@ -16,10 +17,6 @@
display: block;
}

.wp-block-legacy-widget__edit-container .widget-inside {
box-shadow: none;
}

.wp-block-legacy-widget__preview {
overflow: auto;
}
4 changes: 1 addition & 3 deletions packages/block-library/src/media-text/style.scss
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
.wp-block-media-text {
display: grid;
}
Copy link
Member

Choose a reason for hiding this comment

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

It appears this one was resolved separately in #13989, causing the merge conflict. I'll plan to resolve it.


.wp-block-media-text {
grid-template-rows: auto;
align-items: center;
grid-template-areas: "media-text-media media-text-content";
grid-template-columns: 50% auto;

&.has-media-on-the-right {
grid-template-areas: "media-text-content media-text-media";
grid-template-columns: auto 50%;
Expand Down
1 change: 0 additions & 1 deletion packages/components/src/color-palette/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ $color-palette-circle-spacing: 14px;
outline: none;
&::after {
content: "";
position: absolute;
border: #{ $border-width * 2 } solid $dark-gray-400;
width: 32px;
height: 32px;
Expand Down
1 change: 0 additions & 1 deletion packages/editor/src/components/error-boundary/style.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
.editor-error-boundary {
max-width: $content-width;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Please advise as to which max-width to keep. Currently preserving existing behavior, $content-width appears to be too narrow for this element (cf. #8834)

Copy link
Member

@aduth aduth Apr 24, 2019

Choose a reason for hiding this comment

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

Please advise as to which max-width to keep. Currently preserving existing behavior, $content-width appears to be too narrow for this element (cf. #8834)

Since there's no history other than #8834 and the other style will have always taken effect, I expect you've made the correct assumption here.

margin: auto;
max-width: 780px;
padding: 20px;
Expand Down
12 changes: 3 additions & 9 deletions packages/editor/src/components/post-saved-state/style.scss
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
.editor-post-saved-state {
display: flex;
align-items: center;
width: $icon-button-size - 8px;
padding: #{ $grid-size-small * 3 } $grid-size-small;
color: $light-gray-900; // Doesn't need to meet AA because button is disabled and it's supporting text.
overflow: hidden;
white-space: nowrap;

&.is-saving {
animation: edit-post__loading-fade-animation 0.5s infinite;
Expand All @@ -11,15 +14,6 @@
.dashicon {
display: inline-block;
flex: 0 0 auto;
}
}

.editor-post-saved-state {
width: $icon-button-size - 8px;
white-space: nowrap;
padding: #{ $grid-size-small * 3 } $grid-size-small;

.dashicon {
margin-right: $grid-size;
}

Expand Down