Skip to content
Merged
Changes from all commits
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
16 changes: 0 additions & 16 deletions packages/block-library/src/editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@
@import "./post-featured-image/editor.scss";
@import "./post-comments-form/editor.scss";
@import "./post-content/editor.scss";

@import "./editor-elements.scss";

:root .editor-styles-wrapper {
Expand All @@ -64,13 +63,6 @@
@include gradient-colors-deprecated();
}

// This CSS Custom Properties aren't used anymore as defaults,
// but we still need to keep them for backward compatibility.
:where(.editor-styles-wrapper) {
--wp--preset--font-size--normal: 16px;
--wp--preset--font-size--huge: 42px;
}

@ramonjd ramonjd Apr 5, 2024 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Could we also delete in this file the following rules that are duplicated in common.scss?

:root .editor-styles-wrapper {
	@include background-colors-deprecated();
	@include foreground-colors-deprecated();
	@include gradient-colors-deprecated();
}

:where(.editor-styles-wrapper) .has-normal-font-size {
	font-size: var(--wp--preset--font-size--normal);
}

:where(.editor-styles-wrapper) .has-huge-font-size {
	font-size: var(--wp--preset--font-size--huge);
}

?

They are loaded in the top-level and editor frames.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Could we also delete in this file the following rules that are duplicated in common.scss?

From what I've tested, removing these styles should be fine. As I remember, @ellatrix was involved in the process of injecting the document stylesheet into the iframe editor instance. Maybe she has some knowledge.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Thanks again. I'll remove them and ask for forgiveness later :trollface:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I have no idea. If both stylesheets are present in the iframe, it should be fine

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Thanks for checking!

// Font sizes (not used now, kept because of backward compatibility).
//
// The reason we add the editor class wrapper here is
Expand All @@ -83,14 +75,6 @@
font-size: 42px;
}

:where(.editor-styles-wrapper) .has-normal-font-size {
font-size: var(--wp--preset--font-size--normal);
}

:where(.editor-styles-wrapper) .has-huge-font-size {
font-size: var(--wp--preset--font-size--huge);
}

/**
* Editor Normalization Styles
*
Expand Down