Skip to content

Commit 25bdbd1

Browse files
committed
Editor: Fix color of the TinyMCE button icons in the Classic block.
Fixes a CSS specificity conflict with the TinyMCE skin where the button icons were white and barely visible in the buttons active state. Developed in #12783 Props khokansardar, iqbal1hossain, gulamdastgir04, darshitrajyaguru97, afercia. Fixes #65768. git-svn-id: https://develop.svn.wordpress.org/trunk@63532 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 13b6dc3 commit 25bdbd1

1 file changed

Lines changed: 11 additions & 5 deletions

File tree

‎src/wp-includes/css/editor.css‎

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -425,11 +425,17 @@ div.mce-path {
425425
border-color: #50575e;
426426
}
427427

428-
.mce-btn.mce-active,
429-
.mce-btn.mce-active button,
430-
.mce-btn.mce-active:hover button,
431-
.mce-btn.mce-active i,
432-
.mce-btn.mce-active:hover i {
428+
/*
429+
* TinyMCE appends its skin stylesheet when the editor initializes. The skin may
430+
* be parsed after this stylesheet. The extra `mce-toolbar` class gives these
431+
* selectors a higher specificity than the skin's white active state, so that
432+
* the styling no longer depend on source order.
433+
*/
434+
.mce-toolbar .mce-btn.mce-active,
435+
.mce-toolbar .mce-btn.mce-active button,
436+
.mce-toolbar .mce-btn.mce-active:hover button,
437+
.mce-toolbar .mce-btn.mce-active i,
438+
.mce-toolbar .mce-btn.mce-active:hover i {
433439
color: inherit;
434440
}
435441

0 commit comments

Comments
 (0)