File tree Expand file tree Collapse file tree 1 file changed +17
-7
lines changed
src/librustdoc/html/static/css Expand file tree Collapse file tree 1 file changed +17
-7
lines changed Original file line number Diff line number Diff line change @@ -1508,24 +1508,29 @@ details.rustdoc-toggle > summary.hideme > span {
15081508}
15091509
15101510details .rustdoc-toggle > summary ::before {
1511- content : "Expand" ;
1512- font-weight : 300 ;
1513- font-size : 0.8em ;
1514- letter-spacing : 1px ;
1511+ content : " " ;
15151512 cursor : pointer;
15161513 width : 17px ;
15171514 height : max (17px , 1.1em );
15181515 background : data-url (plus-17x17.png) no-repeat top left;
15191516 display : inline-block;
15201517 vertical-align : middle;
15211518 opacity : .5 ;
1522- text-indent : 17px ;
1519+ }
1520+
1521+ /* Screen readers see the text version at the end the line.
1522+ Visual readers see the icon at the start of the line, but small and transparent. */
1523+ details .rustdoc-toggle > summary ::after {
1524+ content : "Expand" ;
15231525 overflow : hidden;
1526+ width : 0 ;
1527+ height : 0 ;
1528+ position : absolute;
15241529}
15251530
1526- details .rustdoc-toggle > summary .hideme ::before {
1531+ details .rustdoc-toggle > summary .hideme ::after {
15271532 /* "hideme" toggles already have a description when they're contracted */
1528- content : " " ;
1533+ content : "" ;
15291534}
15301535
15311536details .rustdoc-toggle > summary : focus ::before {
@@ -1588,6 +1593,11 @@ details.rustdoc-toggle[open] > summary.hideme::before {
15881593 height : max (17px , 1.1em );
15891594 background : data-url (minus-17x17.png) no-repeat top left;
15901595 display : inline-block;
1596+ content : " " ;
1597+ }
1598+
1599+ details .rustdoc-toggle [open ] > summary ::after ,
1600+ details .rustdoc-toggle [open ] > summary .hideme ::after {
15911601 content : "Collapse" ;
15921602}
15931603
You can’t perform that action at this time.
0 commit comments