Skip to content

Commit

Permalink
XWIKI-22495: Missing text content in the resource picker dropdown
Browse files Browse the repository at this point in the history
* Fixed indentation
* Moved around the sr-only style and made it more generic
  • Loading branch information
Sereza7 committed Jan 24, 2025
1 parent 21694b8 commit 715724d
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ define('resourcePicker', [
'<button type="button" class="resourceType btn btn-default">' +
'<span class="icon">' +
'</button>' +
'<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">' +
'<span class="sr-only"></span>' +
'<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">' +
'<span class="sr-only"></span>' +
'<span class="caret"></span>' +
'</button>' +
'<ul class="resourceTypes dropdown-menu dropdown-menu-right"></ul>' +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1019,6 +1019,23 @@ body[data-maximized="true"] {
.cke_editable.cke_show_borders table.cke_show_border &gt; tfoot &gt; tr &gt; 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;
}</code>
</property>
<property>
Expand Down

0 comments on commit 715724d

Please sign in to comment.