Skip to content

Commit

Permalink
Fixed Bullet Point Wrapping Glitch
Browse files Browse the repository at this point in the history
  • Loading branch information
jgavrilo committed Nov 20, 2023
1 parent b2e4519 commit 0f08656
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
16 changes: 15 additions & 1 deletion src/css/todo.css
Original file line number Diff line number Diff line change
Expand Up @@ -125,11 +125,17 @@ h2 {
margin-bottom: 20px;
}

.todo-container {
display: flex;
align-items: center;
}

.todo-checkbox {
appearance: none; /* to remove default checkbox appearance */
-webkit-appearance: none; /* for Safari */
margin-right: 10px;
position: relative; /* to position the pseudo-elements */
flex-shrink: 0;
position: relative;
width: 18px; /* desired width */
height: 18px; /* desired height */
border: 2px solid var(--secondary-color); /* border color */
Expand All @@ -149,6 +155,14 @@ h2 {
border-radius: 50%; /* make it circular */
}

.todo-text {
/* Your existing styles */
overflow: hidden; /* Hides overflow */
text-overflow: ellipsis; /* Adds an ellipsis to truncated text */
flex-grow: 1; /* Allows the text to grow if there's extra space */
}


#buttonSection {
display: flex;
justify-content: space-between;
Expand Down
3 changes: 3 additions & 0 deletions src/js/todo/todoTabMenuManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,9 @@ async function switchTab(tabId) {
span.className = 'todo-text';
span.textContent = task.title;
span.style.textDecoration = task.status === 'completed' ? 'line-through' : 'none';
span.style.whiteSpace = 'nowrap';
span.style.overflow = 'hidden';
span.style.textOverflow = 'ellipsis';
container.appendChild(span);

li.appendChild(container);
Expand Down

0 comments on commit 0f08656

Please sign in to comment.