feat: fixed-size chevron fold toggles
Use 30px hit area and 13.5x20 chevron (90% of the previous H2 marker) for every heading level, restore the outlined arrow, and keep it vertically centered to the left of the heading.
This commit is contained in:
@@ -421,9 +421,12 @@
|
||||
btn.setAttribute('aria-expanded', 'true');
|
||||
btn.title = window.__mdPreviewFoldLabel || 'Collapse / Expand';
|
||||
btn.setAttribute('aria-label', btn.title);
|
||||
btn.innerHTML = '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" ' +
|
||||
'stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round">' +
|
||||
'<path d="m6 9 6 6 6-6"/></svg>';
|
||||
btn.innerHTML = '<svg class="mdp-fold-i-right" viewBox="0 0 12 20" fill="none" ' +
|
||||
'stroke="currentColor" stroke-width="2.2" stroke-linecap="round" ' +
|
||||
'stroke-linejoin="round"><path d="M2 2l8 8-8 8"/></svg>' +
|
||||
'<svg class="mdp-fold-i-down" viewBox="0 0 20 12" fill="none" ' +
|
||||
'stroke="currentColor" stroke-width="2.2" stroke-linecap="round" ' +
|
||||
'stroke-linejoin="round"><path d="M2 2l8 8 8-8"/></svg>';
|
||||
return btn;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user