diff --git a/xwiki-platform-core/xwiki-platform-ckeditor/xwiki-platform-ckeditor-plugins/src/main/webjar/xwiki-resource/resourcePicker.css b/xwiki-platform-core/xwiki-platform-ckeditor/xwiki-platform-ckeditor-plugins/src/main/webjar/xwiki-resource/resourcePicker.css index e992fe3ffef3..422a245f37a2 100644 --- a/xwiki-platform-core/xwiki-platform-ckeditor/xwiki-platform-ckeditor-plugins/src/main/webjar/xwiki-resource/resourcePicker.css +++ b/xwiki-platform-core/xwiki-platform-ckeditor/xwiki-platform-ckeditor-plugins/src/main/webjar/xwiki-resource/resourcePicker.css @@ -19,23 +19,6 @@ */ #template('colorThemeInit.vm') -/* CKEditor contains a CSS reset. It works with its own style sheets and does not use the ones in XWiki. - However, we want `.sr-only` from XWiki to still be usable in our CKEditor plugins. - We need to redefine the XWiki styles of this class to have better priority than the CKEditor CSS reset. - Without this, the elements with this class are still shown - which would be different from the behaviour of `.sr-only` anywhere else in XWiki (as described in our doc). - This redefinition allows for a more consistent behaviour of the `.sr-only` class. */ -.resourcePicker .sr-only { - position: absolute; - width: 1px; - height: 1px; - padding: 0; - margin: -1px; - overflow: hidden; - clip: rect(0, 0, 0, 0); - border: 0; -} - .resourcePicker .dropdown-menu > .active > a, .resourcePicker .dropdown-menu > .active > a:hover, .resourcePicker .dropdown-menu > .active > a:focus { diff --git a/xwiki-platform-core/xwiki-platform-ckeditor/xwiki-platform-ckeditor-plugins/src/main/webjar/xwiki-resource/resourcePicker.js b/xwiki-platform-core/xwiki-platform-ckeditor/xwiki-platform-ckeditor-plugins/src/main/webjar/xwiki-resource/resourcePicker.js index 88aedc3eead9..78bb6dc20c6a 100644 --- a/xwiki-platform-core/xwiki-platform-ckeditor/xwiki-platform-ckeditor-plugins/src/main/webjar/xwiki-resource/resourcePicker.js +++ b/xwiki-platform-core/xwiki-platform-ckeditor/xwiki-platform-ckeditor-plugins/src/main/webjar/xwiki-resource/resourcePicker.js @@ -36,8 +36,8 @@ define('resourcePicker', [ '' + - '' + '' + diff --git a/xwiki-platform-core/xwiki-platform-ckeditor/xwiki-platform-ckeditor-ui/src/main/resources/CKEditor/EditSheet.xml b/xwiki-platform-core/xwiki-platform-ckeditor/xwiki-platform-ckeditor-ui/src/main/resources/CKEditor/EditSheet.xml index 6c5536535fd0..109f0be92a2e 100644 --- a/xwiki-platform-core/xwiki-platform-ckeditor/xwiki-platform-ckeditor-ui/src/main/resources/CKEditor/EditSheet.xml +++ b/xwiki-platform-core/xwiki-platform-ckeditor/xwiki-platform-ckeditor-ui/src/main/resources/CKEditor/EditSheet.xml @@ -1019,6 +1019,23 @@ body[data-maximized="true"] { .cke_editable.cke_show_borders table.cke_show_border > tfoot > tr > td { border-color: @table-border-color; border-style: solid; +} + +/* CKEditor contains a CSS reset. It works with its own style sheets and does not use the ones in XWiki. +However, we want `.sr-only` from XWiki to still be usable in our CKEditor environment. +We need to redefine the XWiki styles of this class to have better priority than the CKEditor CSS reset. +Without this, the elements with this class are still shown which would be different from the behaviour +of `.sr-only` anywhere else in XWiki (as described in our doc). +This redefinition allows for a more consistent behaviour of the `.sr-only` class. */ +.cke_reset_all .sr-only { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + border: 0; }