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

Chore (UI): Improve UI #93

Merged
merged 9 commits into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@
data: {
style: 'ordered',
start: 2,
maxLevel: 3,
maxLevel: 5,
items: [
{
content: "Canon",
Expand Down
3 changes: 2 additions & 1 deletion src/ListTabulator/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -844,7 +844,8 @@ export default class ListTabulator<Renderer extends ListRenderer> {
const currentItemChildrenList = getChildItems(item);

/**
* Check that current item has any children
* If item has no children, just remove item
* Else children of the item should be prepended to the target item child list
*/
if (currentItemChildrenList.length === 0) {
/**
Expand Down
13 changes: 10 additions & 3 deletions src/styles/list.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,18 @@
margin: 0;
padding: 0;
outline: none;
display: grid;
counter-reset: item;
gap: var(--spacing-s);
padding: var(--spacing-xs);
--spacing-s: 8px;
--spacing-xs: 6px;
--list-counter-type: numeric;
--radius-border: 5px;
--checkbox-background: #fff;
--color-border: #C9C9C9;
--color-bg-checked: #369FFF;
--line-height: 1.6em;
--line-height: 145%;
--color-bg-checked-hover: #0059AB;
--color-tick: #fff;
--size-checkbox: 1.2em;
Expand All @@ -21,21 +26,23 @@
grid-template-areas:
"checkbox content"
". child";
margin: 2px 0;

&-children {
display: grid;
grid-area: child;
gap: var(--spacing-s);
padding-top: var(--spacing-s);
}

[contenteditable]{
outline: none;
}

&-content {
margin-left: 8px;
word-break: break-word;
white-space: pre-wrap;
grid-area: content;
padding-left: var(--spacing-s);
}

&::before {
Expand Down
Loading