@@ -146,7 +146,7 @@ <h2 id="heading-5">Heading 5</h2>
146146import '@patternfly/elements/pf-switch/pf-switch.js' ;
147147import '@patternfly/elements/pf-jump-links/pf-jump-links.js' ;
148148
149- const main = document . querySelector ( 'main ') ;
149+ const main = document . getElementById ( 'demo ') ;
150150const links = document . querySelector ( 'pf-jump-links' ) ;
151151const swtch = document . querySelector ( 'pf-switch' ) ;
152152const media = matchMedia ( '(max-width: 600px)' ) ;
@@ -159,7 +159,6 @@ <h2 id="heading-5">Heading 5</h2>
159159 const { matches } = media ;
160160 const { checked } = swtch ;
161161 main . classList . toggle ( 'mobile' , matches ) ;
162- main . classList . toggle ( 'horizontal' , ! checked ) ;
163162 links . vertical = checked ;
164163 links . expandable = matches && checked ;
165164 links . centered = ! checked ;
@@ -213,20 +212,20 @@ <h2 id="heading-5">Heading 5</h2>
213212 padding-inline-start : 48px ;
214213 }
215214
216- & : is (.mobile , .horizontal ) {
215+ & .mobile ,
216+ & : has (pf-jump-links : not ([vertical ])) {
217217 grid-template-rows : repeat (auto-fill, auto);
218218 grid-template-columns : 100% ;
219219 grid-template-areas :
220220 'head'
221221 'side'
222222 'body' ;
223- }
224-
225- & : is (.mobile , .horizontal ) aside {
226- position : sticky;
227- top : 0 ;
228- box-shadow : rgba (3 , 3 , 3 , 0.16 ) 0px 4px 4px -4px ;
229- z-index : 1 ;
223+ & aside {
224+ position : sticky;
225+ top : 0 ;
226+ box-shadow : rgba (3 , 3 , 3 , 0.16 ) 0px 4px 4px -4px ;
227+ z-index : 1 ;
228+ }
230229 }
231230}
232231
0 commit comments