File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
src/pydata_sphinx_theme/assets/styles/content Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -40,8 +40,12 @@ div.admonition,
40
40
41
41
// Defaults for all admonitions
42
42
> .admonition-title {
43
+ $padding-top : 0.4rem ;
44
+ $icon-width : 1rem ;
45
+ $icon-margin-x : 0.5rem ;
46
+
43
47
margin : 0 -0.6rem ;
44
- padding : 0.4rem 0.6rem 0.4 rem 2 rem ;
48
+ padding : 0.4rem 0.6rem $padding-top calc ( $icon-width + 2 * $icon-margin-x ) ;
45
49
font-weight : var (--pst-admonition-font-weight-heading );
46
50
position : relative ;
47
51
@@ -54,9 +58,10 @@ div.admonition,
54
58
55
59
& ::after {
56
60
position : absolute ;
57
- top : 0.5rem ;
58
- left : 0.5rem ;
59
- width : 1rem ;
61
+ top : $padding-top ; // align icon with title text
62
+ left : 0 ;
63
+ margin : 0 $icon-margin-x ;
64
+ width : $icon-width ;
60
65
height : 1rem ;
61
66
color : var (--pst-color-info );
62
67
font : var (--fa-font-solid );
You can’t perform that action at this time.
0 commit comments