Skip to content

Instantly share code, notes, and snippets.

@ahebrank
Created January 28, 2024 20:18
Show Gist options
  • Save ahebrank/3ea1e2d6bee94e9b2cfc4046021ea95f to your computer and use it in GitHub Desktop.
Save ahebrank/3ea1e2d6bee94e9b2cfc4046021ea95f to your computer and use it in GitHub Desktop.
diff --git a/css/media_library_edit.admin.css b/css/media_library_edit.admin.css
index 0a163d4..e2576f8 100644
--- a/css/media_library_edit.admin.css
+++ b/css/media_library_edit.admin.css
@@ -1,4 +1,4 @@
-.media-library-edit__link {
+.media-library-edit__link::after {
position: absolute;
z-index: 1;
top: 40px;
@@ -8,7 +8,6 @@
margin: 5px;
padding: 0;
transition: 0.2s border-color;
- color: transparent;
border: 2px solid #ccc;
border-radius: 20px;
background: url(../icons/pencil.svg) #fff center no-repeat;
@@ -17,10 +16,6 @@
box-sizing: border-box;
}
-.media-library-edit__link:hover {
- color: transparent;
-}
-
.media-library-edit__modal::before {
content: '';
width: 100vw;
diff --git a/media_library_edit.module b/media_library_edit.module
index cbd818c..a2cc7ce 100644
--- a/media_library_edit.module
+++ b/media_library_edit.module
@@ -106,6 +106,7 @@ function media_library_edit_field_widget_single_element_form_alter(array &$eleme
'js-media-library-edit-link',
'media-library-edit__link',
'use-ajax',
+ 'visually-hidden',
],
'target' => '_blank',
'data-dialog-options' => json_encode([
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment