Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Indent headings: Escaping the current indentation level #18

Open
zamsyt opened this issue May 5, 2024 · 4 comments
Open

Indent headings: Escaping the current indentation level #18

zamsyt opened this issue May 5, 2024 · 4 comments

Comments

@zamsyt
Copy link
Owner

zamsyt commented May 5, 2024

Add special handling for empty headings

This discussion started under another issue: #16 (comment)

@zamsyt
Copy link
Owner Author

zamsyt commented May 5, 2024

in edit mode, I don't think it's possible the same way with CSS alone
#16 (comment)

@sdaognklwb I spoke too soon! Taking a closer look at the DOM, I realized this is totally possible across all the modes using empty headings. Coming soon.

@sdaognklwb
Copy link

Thanks! Looking forward to the updated snippet!

@zamsyt
Copy link
Owner Author

zamsyt commented May 25, 2024

@sdaognklwb
I ended up rewriting the snippet using a new method, and took a break from this in between.

I believe this method should be more performant (for larger numbers of headings) (though I still want to do test that). This no longer uses Sass (I can't really do that if I want to use CSS native nesting as I now did)... not sure how I'll now provide configuration for the supported number of headings---perhaps I'll make a custom web downloader with an option for it... Though expanding the snippet is really simple now even manually: just copy paste the last section and increase the number by 1 to support one more heading.

It's in a separate branch for now: nth-child-rewrite/Indent headings.css

Let me know if the the the empty heading syntax for going up a level is working for you, and if things are working well over all!

@zamsyt
Copy link
Owner Author

zamsyt commented May 25, 2024

Ok, shoot, I'm seeing a major performance issue. I'll have to look into that later 😅 Idk why... can only hope it's fixable 🤞 Really thought this would perform better but will see.. if I can't solve this I might need to revert to the old version and implement this feature there

(I'll come back to this tomorrow or next week.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants