Skip to content

Commit 347b1ad

Browse files
authored
ENH: Toggle arrow to the right (#49)
1 parent b51ee8b commit 347b1ad

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

sphinx_togglebutton/_static/togglebutton.css

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -80,15 +80,15 @@ button.toggle-button {
8080
stroke: currentColor; /* So that we inherit the color of other text */
8181
}
8282

83-
/* Rotate icon with admonitions so that it points down */
84-
.admonition.toggle .tb-icon {
85-
transform: rotate(-90deg);
83+
/* The icon should point right when closed, down when open. */
84+
/* Open */
85+
.admonition.toggle button .tb-icon {
86+
transform: rotate(90deg);
8687
}
8788

88-
/* When the admonition is hidden, icon should flip upwards but retain rotation */
89-
/* We scaleX, in order to flip along Y, because it is rotated */
90-
.admonition.toggle .toggle-button-hidden .tb-icon {
91-
transform: rotate(-90deg) scaleX(-1);
89+
/* Closed */
90+
.admonition.toggle button.toggle-button-hidden .tb-icon {
91+
transform: rotate(0deg);
9292
}
9393

9494
/* With details toggles, we don't rotate the icon so it points right */

0 commit comments

Comments
 (0)