File tree Expand file tree Collapse file tree 2 files changed +9
-16
lines changed Expand file tree Collapse file tree 2 files changed +9
-16
lines changed Original file line number Diff line number Diff line change @@ -14,8 +14,8 @@ div.labels {
1414 flex-wrap : wrap;
1515}
1616
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 ;
1919}
2020
2121.header-label-container > div .labels {
@@ -62,19 +62,6 @@ h1 > .header-label {
6262 margin-bottom : 0.2rem ;
6363}
6464
65- .has-label {
66- padding-left : 0.4rem ;
67- border-left : 2px solid rgba (var (--colors-baltic-60 ));
68- }
69-
70- .has-label : has (> .labels > .label--new ) {
71- border-left-color : var (--success-color );
72- }
73-
74- .has-label : has (> .labels > .label--deprecated ) {
75- border-left-color : var (--deprecated-color );
76- }
77-
7865h2 > .flex-label {
7966 float : inline-end;
8067 line-height : var (--doc-line-height );
Original file line number Diff line number Diff line change @@ -140,7 +140,7 @@ document.addEventListener('DOMContentLoaded', function () {
140140 // no need to do anything if we found only undefined roles
141141 if ( labels . length === 0 ) return
142142
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
144144 const labelsDiv = createElement ( 'div' , 'labels' )
145145
146146 for ( const label of labels ) {
@@ -154,6 +154,12 @@ document.addEventListener('DOMContentLoaded', function () {
154154 }
155155 }
156156
157+ console . log ( roleDiv . classList )
158+
159+ if ( roleDiv . classList . contains ( 'admonitionblock' ) ) {
160+ labelsLocation = roleDiv . querySelector ( 'td.content' )
161+ }
162+
157163 if ( roleDiv . nodeName === 'H1' || headings . includes ( roleDiv . firstElementChild . nodeName ) ) {
158164 labelsLocation . append ( labelsDiv )
159165 labelsLocation . classList . add ( 'header-label-container' )
You can’t perform that action at this time.
0 commit comments