Skip to content

Checkbox Item Alignment (Div vs Span) #6413

@kleutzinger

Description

@kleutzinger

Description

Intro

This is kind of a specific, odd behavior with checkboxes and their contents. It may apply to other lists, but I haven't really visually seen it. Fixing this could just be some CSS, I don't really care about the internal html representation, but I do care about the visual alignment somewhat.

The behavior and examples

Only sometimes checkbox < li > elements are wrapped in a div which affects vertical alignment of the text.

Image Image

Here is a full note source showing both alignments:

a way to trigger the div alignment is to paste an html link (like a blue html link copied from a browser with a separate href and text content) into a checkbox. Then, oddly, all subsequent lists below that one will have

wrappers, too, wether or not you paste a link.

Image
<ul class="todo-list">
	<li>
		<label class="todo-list__label">
			<input type="checkbox" disabled="disabled">
			<span class="todo-list__label__description">
				in a span, not a div
			</span>
		</label>
	</li>
	<li>
		<label class="todo-list__label">
			<input type="checkbox" disabled="disabled">
			<span class="todo-list__label__description">
				ab
			</span>
		</label>
	</li>
	<li>
		<label class="todo-list__label">
			<input type="checkbox" disabled="disabled">
			<span class="todo-list__label__description">
				cc
			</span>
		</label>
	</li>
</ul>
<p>
	&nbsp;
</p>
<p>
	&nbsp;
</p>
<ul class="todo-list">
	<li>
		<label class="todo-list__label todo-list__label_without-description">
			<input type="checkbox" disabled="disabled">
		</label>
		<div>
			<a href="https://github.com/TriliumNext/Trilium/issues/new?template=bug_report.yml">
				New Issue
			</a>
			 in a div
		</div>
	</li>
	<li>
		<label class="todo-list__label todo-list__label_without-description">
			<input type="checkbox" disabled="disabled">
		</label>
		<div>
			abc
		</div>
		<ul class="todo-list">
			<li>
				<label class="todo-list__label todo-list__label_without-description">
					<input type="checkbox" disabled="disabled">
				</label>
				<div>
					abc
				</div>
			</li>
		</ul>
	</li>
	<li>
		<label class="todo-list__label todo-list__label_without-description">
			<input type="checkbox" disabled="disabled">
		</label>
		<div>
			abc
		</div>
	</li>
</ul>
<div>
	&nbsp;
</div>
<ul class="todo-list">
	<li>
		<label class="todo-list__label todo-list__label_without-description">
			<input type="checkbox" disabled="disabled">
		</label>
		<div>
			abc
		</div>
	</li>
</ul>
<div>
	&nbsp;
</div>
<hr>
<p>
	&nbsp;
</p>
<ul class="todo-list">
	<li>
		<label class="todo-list__label">
			<input type="checkbox" disabled="disabled">
			<span class="todo-list__label__description">
				not div anymore?
			</span>
		</label>
	</li>
</ul>

TriliumNext Version

0.96.0

What operating system are you using?

Windows

What is your setup?

Local (no sync)

Operating System Version

Windows 10

Error logs

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    UIIssues related to user-interface/front-end

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions