Version 1
[yaffs-website] / web / core / modules / ckeditor / css / plugins / drupalimagecaption / ckeditor.drupalimagecaption.css
diff --git a/web/core/modules/ckeditor/css/plugins/drupalimagecaption/ckeditor.drupalimagecaption.css b/web/core/modules/ckeditor/css/plugins/drupalimagecaption/ckeditor.drupalimagecaption.css
new file mode 100644 (file)
index 0000000..8082585
--- /dev/null
@@ -0,0 +1,21 @@
+/**
+ * @file
+ * Image Caption: overrides to make centered alignment work inside CKEditor.
+ */
+
+/**
+ * Since .align-center is set on the non-captioned image's parent block element
+ * in CKEditor, the image must be centered separately.
+ */
+p[data-widget="image"].align-center {
+  text-align: center;
+}
+
+/**
+ * Since .align-center is set on captioned widget's wrapper element in CKEditor,
+ * the alignment of internals must be set separately.
+ */
+div[data-cke-widget-wrapper].align-center > figure[data-widget="image"] {
+  margin-left: auto;
+  margin-right: auto;
+}