Skip to content

Add nesting-level CSS classes to HTML for text snippets#8

Open
khinsen wants to merge 3 commits intofeenkcom:mainfrom
khinsen:add-nesting-level-class-to-snippets
Open

Add nesting-level CSS classes to HTML for text snippets#8
khinsen wants to merge 3 commits intofeenkcom:mainfrom
khinsen:add-nesting-level-class-to-snippets

Conversation

@khinsen
Copy link
Copy Markdown

@khinsen khinsen commented Dec 29, 2023

Enables proper indentation via CSS

Each text snippet gets an additional class tag of the form nesting-level-1, nesting-level-2`, etc. It can be used in CSS to define indentation:

.nesting-level-2 {margin-left:1rem}
.nesting-level-3 {margin-left:2rem}

I am not sure this is the best way to implement such a feature. It ought to be done for all snippets, not just text snippets, but there doesn't seem to be a good place in the code for that.

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

Successfully merging this pull request may close these issues.

1 participant