diff --git a/src/css/default.css b/src/css/default.css index 09ade7c..743619d 100644 --- a/src/css/default.css +++ b/src/css/default.css @@ -15,10 +15,10 @@ body { width: 70%; height: 100%; margin: 0 auto; + background-color: aliceblue; } .title { - background-color: pink; padding-top: 2%; display: flex; justify-content: center; @@ -31,13 +31,12 @@ body { } .typingform { - background-color: aliceblue; display: flex; justify-content: end; } #list { - margin: 0 auto; + margin: 1rem auto; background-color: beige; border: 1px solid black; padding: 1.5% 4%; @@ -54,7 +53,7 @@ li { .deletebtn, .editbtn { width: 4px; - height: 4px; + height: 8px; border-radius: 50%; margin-top: 1.5%; cursor: pointer; diff --git a/src/index.ts b/src/index.ts index 4985158..c79321f 100644 --- a/src/index.ts +++ b/src/index.ts @@ -34,6 +34,13 @@ form?.addEventListener("submit", (e) => { function addListItem(task: Task) { const item = document.createElement("li"); const label = document.createElement("label"); + // const label = document.createElement("p") as HTMLElement; + const textInside = label.innerHTML as string; + // const textInside = (label.innerHTML = "" as string); + console.log(textInside); + label.addEventListener("click", function () { + label?.focus(); + }); const deletebtn = document.createElement("button"); const editbtn = document.createElement("button"); deletebtn.classList.add("deletebtn"); @@ -54,7 +61,7 @@ function addListItem(task: Task) { item.parentNode?.removeChild(item); }); editbtn.addEventListener("click", function () { - label.blur(); + label?.focus(); }); }