Skip to content

Commit 9b8374a

Browse files
committed
fix(hc-styles): fix a bug in Chrome where highlighting in block editor doesn't work
1 parent c9da1f3 commit 9b8374a

File tree

4 files changed

+12
-6
lines changed

4 files changed

+12
-6
lines changed

plugins/hc-styles/README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
# hc-styles
22
Add badges on member, group, & blog avatars to indicate society memberships.
3-
Add brand styles to society networks.
4-
Etc.
3+
4+
Add brand styles to society networks. Etc.
5+
6+
Fix bug in Chrome where highlighting in the block editor doesn't work.

plugins/hc-styles/css/dispatch-override.css

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,4 @@
1010
top: 46px;
1111
z-index: 99996999 !important;;
1212
}
13-
}
14-
15-
.block-editor-block-list__layout::selection {
16-
background: green !important;
1713
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.block-editor-block-list__layout::selection {
2+
background: green !important;
3+
}

plugins/hc-styles/hc-styles.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@
2727
wp_enqueue_style( 'hc-styles-dispatch' );
2828
}
2929

30+
// later versions of Chrome do not allow for highlighting text in the block editor
31+
// this stylesheet registers a fix
32+
wp_register_style( 'hc-styles-fix-highlight', plugins_url( '/hc-styles/css/fix-for-highlight-bug.css' ) );
33+
wp_enqueue_style( 'hc-styles-fix-highlight' );
34+
3035
/* This is not in prod, let's not break anything by deploying this
3136
add_filter( 'comment_form_defaults', function ( $args ) {
3237
// i.e. different themes may have different form structures.

0 commit comments

Comments
 (0)