Skip to content

Commit

Permalink
chore(SLB-415): remove !important on sidebar
Browse files Browse the repository at this point in the history
  • Loading branch information
colorfield committed Jun 20, 2024
1 parent 2dfa273 commit 6dba0f5
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 12 deletions.
3 changes: 2 additions & 1 deletion apps/cms/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@
"Autosave preview": "./patches/fetch-entity.patch"
},
"drupal/gutenberg": {
"Gutenberg enabled hook": "https://www.drupal.org/files/issues/2024-05-07/gutenberg_enabled_hook_3445677-2.patch"
"Gutenberg enabled hook": "https://www.drupal.org/files/issues/2024-05-07/gutenberg_enabled_hook_3445677-2.patch",
"Remove !important from sidebar": "./patches/gutenberg_remove-important-sidebar.patch"
}
},
"patchLevel": {
Expand Down
16 changes: 16 additions & 0 deletions apps/cms/patches/gutenberg_remove-important-sidebar.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
diff --git a/css/claro.css b/css/claro.css
index 720c3a8..9c5ad05 100644
--- a/css/claro.css
+++ b/css/claro.css
@@ -44,8 +44,8 @@

@media screen and (min-width: 85.375rem) {
.interface-complementary-area.edit-post-sidebar {
- width: 380px !important;
+ width: 380px;
}
}

-/*# sourceMappingURL=claro.css.map */
\ No newline at end of file
+/*# sourceMappingURL=claro.css.map */
10 changes: 0 additions & 10 deletions packages/drupal/gutenberg_blocks/css/edit.css
Original file line number Diff line number Diff line change
Expand Up @@ -101,16 +101,6 @@
text-decoration: none;
}

/* This is set by the Gutenberg module */
/* Provide a patch to remove !important */
/*
@media screen and (min-width: 85.375rem) {
.interface-complementary-area.edit-post-sidebar {
width: 380px !important;
}
}
*/

.gutenberg__editor .drupal-preview-sidebar {
min-width: 350px;
border-right: 1px solid #e0e0e0;
Expand Down
2 changes: 1 addition & 1 deletion packages/drupal/gutenberg_blocks/src/preview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
attach: function (context) {
$(once('gutenbergBlocksPreview', '.gutenberg-full-editor', context)).each(
function () {
$('#edit-preview-link').on('click', function (e) {
$('#edit-preview-link').on('click', function (e: Event) {
e.preventDefault();

const previewUrl = drupalSettings.preview.previewUrl;
Expand Down

0 comments on commit 6dba0f5

Please sign in to comment.