File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed
packages/site-kit/src/lib Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change 7575 h 2,
7676 h 3 {
7777 max-width : 100% ;
78- text-overflow : ellipsis ;
79- overflow : hidden ;
8078 padding : 0 1em 0 0 ;
8179
8280 @media (min-width : 768px ) {
8381 margin : 0 0 0 -2em ;
8482 padding : 0 1em 0 2em ;
8583 }
84+
85+ /* we can't use `text-overflow` on the heading itself,
86+ because `overflow: hidden` defeats `scroll-margin` */
87+ & > span {
88+ display : block ;
89+ overflow : hidden ;
90+ text-overflow : ellipsis ;
91+ }
8692 }
8793
8894 h2 {
Original file line number Diff line number Diff line change @@ -269,10 +269,10 @@ export async function render_content_markdown(
269269 headings [ depth - 1 ] = slugify ( raw ) ;
270270 headings . length = depth ;
271271 const slug = headings . filter ( Boolean ) . join ( '-' ) ;
272- return `<h${ depth } id="${ slug } ">${ text . replace (
272+ return `<h${ depth } id="${ slug } "><span> ${ text . replace (
273273 / < \/ ? c o d e > / g,
274274 ''
275- ) } <a href="#${ slug } " class="permalink"><span class="visually-hidden">permalink</span></a></h${ depth } >`;
275+ ) } </span>< a href="#${ slug } " class="permalink"><span class="visually-hidden">permalink</span></a></h${ depth } >`;
276276 } ,
277277 code ( { text } ) {
278278 return snippets . get ( text ) ;
You can’t perform that action at this time.
0 commit comments