File tree Expand file tree Collapse file tree 2 files changed +12
-6
lines changed Expand file tree Collapse file tree 2 files changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -14,8 +14,8 @@ div.labels {
14
14
flex-wrap : wrap;
15
15
}
16
16
17
- .admonitionblock > div .labels {
18
- padding : 1 rem 1 rem 0.75 rem ;
17
+ .admonitionblock div .labels {
18
+ padding : 0.5 rem 0 1 rem ;
19
19
}
20
20
21
21
.header-label-container > div .labels {
@@ -62,16 +62,16 @@ h1 > .header-label {
62
62
margin-bottom : 0.2rem ;
63
63
}
64
64
65
- .has-label {
65
+ .paragraph . has-label {
66
66
padding-left : 0.4rem ;
67
67
border-left : 2px solid rgba (var (--colors-baltic-60 ));
68
68
}
69
69
70
- .has-label : has (> .labels > .label--new ) {
70
+ .paragraph . has-label : has (> .labels > .label--new ) {
71
71
border-left-color : var (--success-color );
72
72
}
73
73
74
- .has-label : has (> .labels > .label--deprecated ) {
74
+ .paragraph . has-label : has (> .labels > .label--deprecated ) {
75
75
border-left-color : var (--deprecated-color );
76
76
}
77
77
Original file line number Diff line number Diff line change @@ -140,7 +140,7 @@ document.addEventListener('DOMContentLoaded', function () {
140
140
// no need to do anything if we found only undefined roles
141
141
if ( labels . length === 0 ) return
142
142
143
- const labelsLocation = ( roleDiv . firstElementChild && headings . includes ( roleDiv . firstElementChild . nodeName ) ) ? roleDiv . firstElementChild : roleDiv
143
+ let labelsLocation = ( roleDiv . firstElementChild && headings . includes ( roleDiv . firstElementChild . nodeName ) ) ? roleDiv . firstElementChild : roleDiv
144
144
const labelsDiv = createElement ( 'div' , 'labels' )
145
145
146
146
for ( const label of labels ) {
@@ -154,6 +154,12 @@ document.addEventListener('DOMContentLoaded', function () {
154
154
}
155
155
}
156
156
157
+ console . log ( roleDiv . classList )
158
+
159
+ if ( roleDiv . classList . contains ( 'admonitionblock' ) ) {
160
+ labelsLocation = roleDiv . querySelector ( 'td.content' )
161
+ }
162
+
157
163
if ( roleDiv . nodeName === 'H1' || headings . includes ( roleDiv . firstElementChild . nodeName ) ) {
158
164
labelsLocation . append ( labelsDiv )
159
165
labelsLocation . classList . add ( 'header-label-container' )
You can’t perform that action at this time.
0 commit comments