summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Pott2015-10-06 00:20:26 (GMT)
committerAlex Pott2015-10-06 00:20:26 (GMT)
commitb8a6e72ab4da6839c80a01709c3adca57cd0f7d3 (patch)
tree6579d50c3ef80cadc120d651de65d87c68864636
parent7594f7ebcbd3c11e9313f15900da5566ec3730d8 (diff)
Issue #2485425 by MathieuSpil, iro, saki007ster, Wim Leers, Manjit.Singh, wiifm, kostask, Studiographene, alvar0hurtad0, LewisNyman: Clean up editor CSS inline with our CSS standards
-rw-r--r--core/modules/ckeditor/js/ckeditor.js5
-rw-r--r--core/modules/editor/css/editor.css16
-rw-r--r--core/modules/editor/src/Tests/EditorImageDialogTest.php2
-rw-r--r--core/themes/classy/classy.libraries.yml1
-rw-r--r--core/themes/classy/css/components/ui-dialog.css15
-rw-r--r--core/themes/seven/css/components/dialog.css3
6 files changed, 22 insertions, 20 deletions
diff --git a/core/modules/ckeditor/js/ckeditor.js b/core/modules/ckeditor/js/ckeditor.js
index d621576..3e61214 100644
--- a/core/modules/ckeditor/js/ckeditor.js
+++ b/core/modules/ckeditor/js/ckeditor.js
@@ -215,9 +215,10 @@
// Add a consistent dialog class.
var classes = dialogSettings.dialogClass ? dialogSettings.dialogClass.split(' ') : [];
- classes.push('editor-dialog');
+ classes.push('ui-dialog--narrow');
dialogSettings.dialogClass = classes.join(' ');
dialogSettings.autoResize = Drupal.checkWidthBreakpoint(600);
+ dialogSettings.width = 'auto';
// Add a "Loading…" message, hide it underneath the CKEditor toolbar,
// create a Drupal.Ajax instance to load the dialog and trigger it.
@@ -248,7 +249,7 @@
// Moves the dialog to the top of the CKEDITOR stack.
$(window).on('dialogcreate', function (e, dialog, $element, settings) {
- $('.editor-dialog').css("zIndex", CKEDITOR.config.baseFloatZIndex + 1);
+ $('.ui-dialog--narrow').css("zIndex", CKEDITOR.config.baseFloatZIndex + 1);
});
// Respond to new dialogs that are opened by CKEditor, closing the AJAX loader.
diff --git a/core/modules/editor/css/editor.css b/core/modules/editor/css/editor.css
deleted file mode 100644
index 9d1c660..0000000
--- a/core/modules/editor/css/editor.css
+++ /dev/null
@@ -1,16 +0,0 @@
-/**
- * @file
- * Styles for text editors.
- */
-
-.editor-dialog {
- /* This !important is required to override inline CSS of jQuery UI. */
- width: 80% !important;
- max-width: 500px;
-}
-
-@media screen and (max-width: 600px) {
- .editor-dialog {
- width: 95% !important;
- }
-}
diff --git a/core/modules/editor/src/Tests/EditorImageDialogTest.php b/core/modules/editor/src/Tests/EditorImageDialogTest.php
index 3cb9aad..8efea38 100644
--- a/core/modules/editor/src/Tests/EditorImageDialogTest.php
+++ b/core/modules/editor/src/Tests/EditorImageDialogTest.php
@@ -104,7 +104,7 @@ class EditorImageDialogTest extends EntityUnitTestBase {
],
'dialogOptions' => [
'title' => 'Edit Image',
- 'dialogClass' => 'editor-image-dialog editor-dialog',
+ 'dialogClass' => 'editor-image-dialog',
'autoResize' => 'true',
],
'_drupal_ajax' => '1',
diff --git a/core/themes/classy/classy.libraries.yml b/core/themes/classy/classy.libraries.yml
index d39d202..e732669 100644
--- a/core/themes/classy/classy.libraries.yml
+++ b/core/themes/classy/classy.libraries.yml
@@ -24,6 +24,7 @@ base:
css/components/tablesort.css: { weight: -10 }
css/components/tabs.css: { weight: -10 }
css/components/textarea.css: { weight: -10 }
+ css/components/ui-dialog.css: { weight: -10 }
book-navigation:
version: VERSION
diff --git a/core/themes/classy/css/components/ui-dialog.css b/core/themes/classy/css/components/ui-dialog.css
new file mode 100644
index 0000000..2522bad
--- /dev/null
+++ b/core/themes/classy/css/components/ui-dialog.css
@@ -0,0 +1,15 @@
+/**
+ * @file
+ * Styles for Classy's modal windows.
+ */
+
+.ui-dialog--narrow {
+ max-width: 500px;
+}
+
+@media screen and (max-width: 600px) {
+ .ui-dialog--narrow {
+ max-width: 95%;
+ min-width: 95%;
+ }
+}
diff --git a/core/themes/seven/css/components/dialog.css b/core/themes/seven/css/components/dialog.css
index 60954d6..d104c82 100644
--- a/core/themes/seven/css/components/dialog.css
+++ b/core/themes/seven/css/components/dialog.css
@@ -11,7 +11,8 @@
}
@media all and (max-width: 48em) { /* 768px */
.ui-dialog {
- width: 92% !important;
+ min-width: 92%;
+ max-width: 92%;
}
}
.ui-dialog .ui-dialog-titlebar {