From 18363413ee72205d174e4e9b1cb1253713f1761b Mon Sep 17 00:00:00 2001
From: Amrillo
Date: Mon, 13 Oct 2025 15:35:15 +0500
Subject: [PATCH 01/30] fix(basic-1.1, 2.1 and 3.7):adjust identation for html
and css and add semicolon after properties in css
---
index.html | 67 +++++++++++++++++------
style.css | 158 ++++++++++++++++++++++++++---------------------------
2 files changed, 126 insertions(+), 99 deletions(-)
diff --git a/index.html b/index.html
index ef4aa1f60c..891df737ce 100644
--- a/index.html
+++ b/index.html
@@ -1,19 +1,52 @@
-Todo App
-
-
-
-
-
-
-
Todo
-
Completed
-
-
-
+
+ Todo App
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Todo
+
+
Completed
+
+
+
+
\ No newline at end of file
diff --git a/style.css b/style.css
index ab36227705..a663b77397 100644
--- a/style.css
+++ b/style.css
@@ -1,148 +1,142 @@
/* Basic Style */
body {
- background-color: #f8f8f8;
- color: #333;
- font-family: Lato, sans-serif;
+ background-color: #f8f8f8;
+ color: #333;
+ font-family: Lato, sans-serif;
}
.aaa {
- width: 500px;
- margin: 0 auto;
- display: block;
- text-align: right;
+ width: 500px;
+ margin: 0 auto;
+ display: block;
+ text-align: right;
}
.aaa img {
- width: 100%;
+ width: 100%;
}
.aaa .more_inf {
- font-family: fantasy, cursive;
+ font-family: fantasy, cursive;
}
@media (max-width:768px) {
-.aaa { text-align: center;
-}
+ .aaa {
+ text-align: center;
+ }
}
.centered-main-page-element {
- display: block;
- width: 500px;
- margin: 0 auto 0;
+ display: block;
+ width: 500px;
+ margin: 0 auto 0;
}
.task {
- width: 56%;
- display: inline-block;
- flex-grow: 1
+ width: 56%;
+ display: inline-block;
+ flex-grow: 1
}
.task-row-wrapper {
- display: flex;
+ display: flex;
}
ul {
- margin:0;
- padding: 0px;
+ margin:0;
+ padding: 0px;
}
li, h3 {
- list-style:none;
+ list-style:none;
}
input,button{
- outline:none;
+ outline:none;
}
button {
- background: none;
- border: 0px;
- color: #888;
- font-size: 15px;
- width: 60px;
- font-family: Lato, sans-serif;
- cursor: pointer;
+ background: none;
+ border: 0px;
+ color: #888;
+ font-size: 15px;
+ width: 60px;
+ font-family: Lato, sans-serif;
+ cursor: pointer;
}
button:hover {
- color: #3a3A3a;
+ color: #3a3A3a;
}
/* Heading */
h3,
label[for='new-task'] {
- color: #333;
- font-weight: 700;
- font-size: 15px;
- border-bottom: 2px solid #333;
- padding: 30px 0 10px;
- margin: 0;
- text-transform: uppercase;
+ color: #333;
+ font-weight: 700;
+ font-size: 15px;
+ border-bottom: 2px solid #333;
+ padding: 30px 0 10px;
+ margin: 0;
+ text-transform: uppercase;
}
input[type="text"] {
- margin: 0;
- font-size: 18px;
- line-height: 18px;
- height: 21px;
- padding: 0 9px;
- border: 1px solid #dDd;
- background: #FFF;
- border-radius: 6px;
- font-family: Lato, sans-serif;
- color: #888;
+ margin: 0;
+ font-size: 18px;
+ line-height: 18px;
+ height: 21px;
+ padding: 0 9px;
+ border: 1px solid #dDd;
+ background: #FFF;
+ border-radius: 6px;
+ font-family: Lato, sans-serif;
+ color: #888;
}
input[type="text"]:focus {
- color: #333;
+ color: #333;
}
-
/* New Task */
label[for='new-task'] {
- display: block;
- margin: 0 0 20px;
+ display: block;
+ margin: 0 0 20px;
}
input#new-task {
- width: 318px;
+ width: 318px;
}
-
/* Task list */
li {
- overflow: hidden;
- padding: 20px 0;
- border-bottom: 1px solid #eee;
-
- display: flex;
- justify-content: space-between;
- align-items: center;
+ overflow: hidden;
+ padding: 20px 0;
+ border-bottom: 1px solid #eee;
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
}
li > * {
- vertical-align: middle;
+ vertical-align: middle;
}
-
li > input[type="checkbox"] {
- margin: 0 10px;
+ margin: 0 10px;
}
li > label {
- padding-left: 10px;
- box-sizing: border-box;
- font-size: 18px;
- width: 226px;
+ padding-left: 10px;
+ box-sizing: border-box;
+ font-size: 18px;
+ width: 226px;
}
-li > input[type="text"] {
- width: 226px
+li > input[type="text"] {
+ width: 226px
}
button.delete img {
- height: 2em;
- transform: rotateZ(45deg);
- transition: transform 200ms ease-in;
+ height: 2em;
+ transform: rotateZ(45deg);
+ transition: transform 200ms ease-in;
}
button.delete img:hover {
- transform: rotateZ(0);
+ transform: rotateZ(0);
}
-
/* Completed */
ul#completed-tasks label {
- text-decoration: line-through
- color: #888;
+ text-decoration: line-through;
+ color: #888;
}
-
/* Edit Task */
ul li input[type=text] {
- display:none
+ display:none
}
ul li.editMode input[type=text] {
- display:inline-block;
- width:224px
+ display:inline-block;
+ width:224px
}
-
ul li.editMode label {
- display:none;
+ display:none;
}
\ No newline at end of file
From e8ea638472f7f32a481a1ea6c6d8e1e7b5755bbb Mon Sep 17 00:00:00 2001
From: Amrillo
Date: Mon, 13 Oct 2025 15:39:27 +0500
Subject: [PATCH 02/30] fix(basic-1.3): add double quotes instead of single
quotes for HTML attributes and CSS properties
---
index.html | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/index.html b/index.html
index 891df737ce..7be822bd08 100644
--- a/index.html
+++ b/index.html
@@ -1,26 +1,26 @@
Todo App
-
+
-
+
-
+
Todo
-
-
+
From fb2fa44a73c12defb13254c4ef5fc1617d3717b2 Mon Sep 17 00:00:00 2001
From: Amrillo
Date: Mon, 13 Oct 2025 15:45:02 +0500
Subject: [PATCH 03/30] fix(basic-1.2): change HTML-tags, attributes and their
values, CSS selectors, CSS properties and their values to lowercase
---
index.html | 8 ++++----
style.css | 4 ++--
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/index.html b/index.html
index 7be822bd08..c4ad670c5f 100644
--- a/index.html
+++ b/index.html
@@ -1,9 +1,9 @@
-
+
Todo App
-
-
+
+

@@ -47,6 +47,6 @@
Completed
-
+
\ No newline at end of file
diff --git a/style.css b/style.css
index a663b77397..693fe89038 100644
--- a/style.css
+++ b/style.css
@@ -74,8 +74,8 @@ input[type="text"] {
line-height: 18px;
height: 21px;
padding: 0 9px;
- border: 1px solid #dDd;
- background: #FFF;
+ border: 1px solid #ddd;
+ background: #fff;
border-radius: 6px;
font-family: Lato, sans-serif;
color: #888;
From d2d574bea88cf99241ddf668de5bef261b7217db Mon Sep 17 00:00:00 2001
From: Amrillo
Date: Mon, 13 Oct 2025 15:51:13 +0500
Subject: [PATCH 04/30] fix(basic-2.2):add tag DOCTYPE html
---
index.html | 1 +
1 file changed, 1 insertion(+)
diff --git a/index.html b/index.html
index c4ad670c5f..63df558c78 100644
--- a/index.html
+++ b/index.html
@@ -1,3 +1,4 @@
+
Todo App
From 1f43284a258b480434b3f31cf91e02d30c4f7e50 Mon Sep 17 00:00:00 2001
From: Amrillo
Date: Mon, 13 Oct 2025 16:01:14 +0500
Subject: [PATCH 05/30] fix(basic-2.4): remove 'type' attribute
---
index.html | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/index.html b/index.html
index 63df558c78..3e5455389d 100644
--- a/index.html
+++ b/index.html
@@ -2,8 +2,8 @@
Todo App
-
-
+
+
@@ -48,6 +48,6 @@
Completed
-
+
\ No newline at end of file
From e16514dab53230fc09bf2e0bdfc4d6946b628128 Mon Sep 17 00:00:00 2001
From: Amrillo
Date: Mon, 13 Oct 2025 16:04:21 +0500
Subject: [PATCH 06/30] fix(basic-1.3):add double quotes instead of single
quotes for HTML attributes and CSS properties
---
index.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/index.html b/index.html
index 3e5455389d..7e94122d7d 100644
--- a/index.html
+++ b/index.html
@@ -19,7 +19,7 @@
Todo
-
+
-
From 9597b2d47393086e5a6b987152e922adfa04b2b5 Mon Sep 17 00:00:00 2001
From: Amrillo
Date: Mon, 13 Oct 2025 16:32:11 +0500
Subject: [PATCH 07/30] refactor(extended-1.1): add proper semantics to the
html tags
---
index.html | 48 +++++++++++++++++++++++++++++-------------------
1 file changed, 29 insertions(+), 19 deletions(-)
diff --git a/index.html b/index.html
index 7e94122d7d..f1a498770e 100644
--- a/index.html
+++ b/index.html
@@ -3,38 +3,45 @@
Todo App
-
+
-
-
+
+
-
\ No newline at end of file
+
+
+
From d805793b165d3e90f706d2a9b1db61aa681a696e Mon Sep 17 00:00:00 2001
From: Amrillo
Date: Wed, 15 Oct 2025 11:17:53 +0500
Subject: [PATCH 08/30] fix(basic-3.2,3.4): remove some tag selectors and give
the meaningfull name for classes and identifiers
---
index.html | 6 ++---
style.css | 65 ++++++++++++++++++++++++++++--------------------------
2 files changed, 37 insertions(+), 34 deletions(-)
diff --git a/index.html b/index.html
index f1a498770e..1023620114 100644
--- a/index.html
+++ b/index.html
@@ -5,12 +5,12 @@
-
-
+
+
-
+
diff --git a/style.css b/style.css
index 693fe89038..5228b9e20b 100644
--- a/style.css
+++ b/style.css
@@ -1,28 +1,53 @@
/* Basic Style */
-body {
+.page {
background-color: #f8f8f8;
color: #333;
font-family: Lato, sans-serif;
}
-.aaa {
+ul {
+ margin:0;
+ padding: 0px;
+}
+li, h3 {
+ list-style:none;
+}
+input,button{
+ outline:none;
+}
+button {
+ background: none;
+ border: 0px;
+ color: #888;
+ font-size: 15px;
+ width: 60px;
+ font-family: Lato, sans-serif;
+ cursor: pointer;
+}
+button:hover {
+ color: #3a3A3a;
+}
+li > * {
+ vertical-align: middle;
+}
+.header {
width: 500px;
margin: 0 auto;
display: block;
text-align: right;
}
-.aaa img {
+.header img {
width: 100%;
}
-.aaa .more_inf {
+.header .more_inf {
font-family: fantasy, cursive;
}
@media (max-width:768px) {
- .aaa {
+ .header {
text-align: center;
}
}
-.centered-main-page-element {
+.main-wrapper {
display: block;
width: 500px;
margin: 0 auto 0;
@@ -35,28 +60,8 @@ body {
.task-row-wrapper {
display: flex;
}
-ul {
- margin:0;
- padding: 0px;
-}
-li, h3 {
- list-style:none;
-}
-input,button{
- outline:none;
-}
-button {
- background: none;
- border: 0px;
- color: #888;
- font-size: 15px;
- width: 60px;
- font-family: Lato, sans-serif;
- cursor: pointer;
-}
-button:hover {
- color: #3a3A3a;
-}
+
+
/* Heading */
h3,
label[for='new-task'] {
@@ -100,9 +105,7 @@ li {
justify-content: space-between;
align-items: center;
}
-li > * {
- vertical-align: middle;
-}
+
li > input[type="checkbox"] {
margin: 0 10px;
}
From 7f2ba85ad9b94e5fc815d0334b3ade9d1e3204ae Mon Sep 17 00:00:00 2001
From: Amrillo
Date: Wed, 15 Oct 2025 11:24:16 +0500
Subject: [PATCH 09/30] fix(basic-3.1): use single style for selectors naming
---
app.js | 4 ++--
index.html | 4 ++--
style.css | 6 +++---
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/app.js b/app.js
index ab737a6002..a290e7d92f 100644
--- a/app.js
+++ b/app.js
@@ -85,7 +85,7 @@ var editTask=function(){
var editInput=listItem.querySelector('input[type=text]');
var label=listItem.querySelector("label");
var editBtn=listItem.querySelector(".edit");
- var containsClass=listItem.classList.contains("editMode");
+ var containsClass=listItem.classList.contains("edit-mode");
//If class of the parent is .editmode
if(containsClass){
@@ -99,7 +99,7 @@ var editTask=function(){
}
//toggle .editmode on the parent.
- listItem.classList.toggle("editMode");
+ listItem.classList.toggle("edit-mode");
};
diff --git a/index.html b/index.html
index 1023620114..273b468db6 100644
--- a/index.html
+++ b/index.html
@@ -8,7 +8,7 @@
@@ -30,7 +30,7 @@ Todo
- -
+
-
diff --git a/style.css b/style.css
index 5228b9e20b..0544b3bffb 100644
--- a/style.css
+++ b/style.css
@@ -38,7 +38,7 @@ li > * {
.header img {
width: 100%;
}
-.header .more_inf {
+.header .more-inf {
font-family: fantasy, cursive;
}
@@ -136,10 +136,10 @@ ul li input[type=text] {
display:none
}
-ul li.editMode input[type=text] {
+ul li.edit-mode input[type=text] {
display:inline-block;
width:224px
}
-ul li.editMode label {
+ul li.edit-mode label {
display:none;
}
\ No newline at end of file
From b5dd60af77a53001e25b3730b8fe5642a5b80b67 Mon Sep 17 00:00:00 2001
From: Amrillo
Date: Wed, 15 Oct 2025 11:29:24 +0500
Subject: [PATCH 10/30] fix(basic-3.3,3.1): keep the name of identifiers
concise and keep a single styling
---
app.js | 2 +-
index.html | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/app.js b/app.js
index a290e7d92f..2cce02bd34 100644
--- a/app.js
+++ b/app.js
@@ -10,7 +10,7 @@
var taskInput=document.getElementById("new-task");//Add a new task.
var addButton=document.getElementsByTagName("button")[0];//first button
-var incompleteTaskHolder=document.getElementById("incompleteTasks");//ul of #incompleteTasks
+var incompleteTaskHolder=document.getElementById("incomplete-tasks");//ul of #incompleteTasks
var completedTasksHolder=document.getElementById("completed-tasks");//completed-tasks
diff --git a/index.html b/index.html
index 273b468db6..fec6ba414b 100644
--- a/index.html
+++ b/index.html
@@ -11,7 +11,7 @@
Want more details?
-
+
@@ -20,7 +20,7 @@
Todo
-
+
-
From 74faae10f0bb042391c83aebfbe95aad010b0dec Mon Sep 17 00:00:00 2001
From: Amrillo
Date: Wed, 15 Oct 2025 11:30:57 +0500
Subject: [PATCH 11/30] fix(basic-3.8):separate selectors and properties
---
style.css | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/style.css b/style.css
index 0544b3bffb..12c0ab6ec6 100644
--- a/style.css
+++ b/style.css
@@ -8,10 +8,12 @@ ul {
margin:0;
padding: 0px;
}
-li, h3 {
+li,
+h3 {
list-style:none;
}
-input,button{
+input,
+button{
outline:none;
}
button {
@@ -60,8 +62,6 @@ li > * {
.task-row-wrapper {
display: flex;
}
-
-
/* Heading */
h3,
label[for='new-task'] {
From 77ae498438bc6c6b2a6304de04304736c3b428a1 Mon Sep 17 00:00:00 2001
From: Amrillo
Date: Wed, 15 Oct 2025 11:34:03 +0500
Subject: [PATCH 12/30] fix(basic-3.6): put space after property name
---
style.css | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/style.css b/style.css
index 12c0ab6ec6..238131e55f 100644
--- a/style.css
+++ b/style.css
@@ -5,16 +5,16 @@
font-family: Lato, sans-serif;
}
ul {
- margin:0;
- padding: 0px;
+ margin: 0;
+ padding: 0;
}
li,
h3 {
- list-style:none;
+ list-style: none;
}
input,
button{
- outline:none;
+ outline: none;
}
button {
background: none;
@@ -133,13 +133,13 @@ ul#completed-tasks label {
}
/* Edit Task */
ul li input[type=text] {
- display:none
+ display: none
}
ul li.edit-mode input[type=text] {
- display:inline-block;
- width:224px
+ display: inline-block;
+ width: 224px
}
ul li.edit-mode label {
- display:none;
+ display: none;
}
\ No newline at end of file
From c29ad717a05733a7eda3ae5d524d6fb8a3cd52dd Mon Sep 17 00:00:00 2001
From: Amrillo
Date: Wed, 15 Oct 2025 15:29:19 +0500
Subject: [PATCH 13/30] fix(basic-3.3):remove extra clasess to keep the styling
short and concise
---
style.css | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/style.css b/style.css
index 238131e55f..3dd18f7aea 100644
--- a/style.css
+++ b/style.css
@@ -13,7 +13,7 @@ h3 {
list-style: none;
}
input,
-button{
+button {
outline: none;
}
button {
@@ -37,10 +37,10 @@ li > * {
display: block;
text-align: right;
}
-.header img {
+img {
width: 100%;
}
-.header .more-inf {
+.more-inf {
font-family: fantasy, cursive;
}
From 4450bd827928c3606c4635e74fb7c639a2bdb28d Mon Sep 17 00:00:00 2001
From: Amrillo
Date: Wed, 15 Oct 2025 15:31:11 +0500
Subject: [PATCH 14/30] refactor(extended-1.1): change label tag to h3 tag to
improve semantics
---
index.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/index.html b/index.html
index fec6ba414b..39273370fd 100644
--- a/index.html
+++ b/index.html
@@ -12,7 +12,7 @@
-
+
Add Item
From 2ac7670358424e2029fcadfeccb3556c035ab836 Mon Sep 17 00:00:00 2001
From: Amrillo
Date: Wed, 15 Oct 2025 15:45:37 +0500
Subject: [PATCH 15/30] fix(basic-3.1,3.4): remove tag selectors and keep
single styling for classes
---
index.html | 6 +++---
style.css | 9 ++-------
2 files changed, 5 insertions(+), 10 deletions(-)
diff --git a/index.html b/index.html
index 39273370fd..676ab25d04 100644
--- a/index.html
+++ b/index.html
@@ -12,14 +12,14 @@
- Completed
+ Completed
-
diff --git a/style.css b/style.css
index 3dd18f7aea..7dac4c7d08 100644
--- a/style.css
+++ b/style.css
@@ -63,14 +63,13 @@ img {
display: flex;
}
/* Heading */
-h3,
-label[for='new-task'] {
+.todo-title {
color: #333;
font-weight: 700;
font-size: 15px;
border-bottom: 2px solid #333;
padding: 30px 0 10px;
- margin: 0;
+ margin: 0 0 20px;
text-transform: uppercase;
}
input[type="text"] {
@@ -89,10 +88,6 @@ input[type="text"]:focus {
color: #333;
}
/* New Task */
-label[for='new-task'] {
- display: block;
- margin: 0 0 20px;
-}
input#new-task {
width: 318px;
}
From 715f621127482630057e60fe62e1777e396b2733 Mon Sep 17 00:00:00 2001
From: Amrillo
Date: Wed, 15 Oct 2025 15:58:46 +0500
Subject: [PATCH 16/30] fix(basic-3.4): change tag selectors to classes
---
style.css | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/style.css b/style.css
index 7dac4c7d08..1557499da6 100644
--- a/style.css
+++ b/style.css
@@ -92,7 +92,7 @@ input#new-task {
width: 318px;
}
/* Task list */
-li {
+.todo-item {
overflow: hidden;
padding: 20px 0;
border-bottom: 1px solid #eee;
@@ -100,19 +100,19 @@ li {
justify-content: space-between;
align-items: center;
}
-
-li > input[type="checkbox"] {
+.todo-item > input[type="checkbox"] {
margin: 0 10px;
}
-li > label {
+.todo-item > label {
padding-left: 10px;
box-sizing: border-box;
font-size: 18px;
width: 226px;
}
-li > input[type="text"] {
+.todo-item > input[type="text"] {
width: 226px
}
+
button.delete img {
height: 2em;
transform: rotateZ(45deg);
@@ -127,14 +127,14 @@ ul#completed-tasks label {
color: #888;
}
/* Edit Task */
-ul li input[type=text] {
+ul .todo-item input[type=text] {
display: none
}
-ul li.edit-mode input[type=text] {
+ul .edit-mode input[type=text] {
display: inline-block;
width: 224px
}
-ul li.edit-mode label {
+ul .edit-mode label {
display: none;
}
\ No newline at end of file
From aecb99b0208e5d4ef9a8de5b72c066db3f0bfcfc Mon Sep 17 00:00:00 2001
From: Amrillo
Date: Wed, 15 Oct 2025 16:19:43 +0500
Subject: [PATCH 17/30] fix(no-rule): add classes to tag elements and add
classname in app.js due to the adjustment in styling
---
app.js | 3 ++-
index.html | 6 +++---
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/app.js b/app.js
index 2cce02bd34..2daf05fc97 100644
--- a/app.js
+++ b/app.js
@@ -31,7 +31,8 @@ var createNewTaskElement=function(taskString){
//button.delete
var deleteButton=document.createElement("button");//delete button
var deleteButtonImg=document.createElement("img");//delete button image
-
+ listItem.className = 'todo-item';
+
label.innerText=taskString;
label.className='task';
diff --git a/index.html b/index.html
index 676ab25d04..633221625c 100644
--- a/index.html
+++ b/index.html
@@ -21,7 +21,7 @@
Add Item
Todo
- -
+
-
@@ -30,7 +30,7 @@
Todo
- -
+
-
@@ -44,7 +44,7 @@
Todo
Completed
- -
+
-
From ede1522e6f4bd52080161b727d1409afe2561c3e Mon Sep 17 00:00:00 2001
From: Amrillo
Date: Wed, 15 Oct 2025 17:30:01 +0500
Subject: [PATCH 18/30] fix(basic-3.2): give the meaningfull name for classes
---
style.css | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/style.css b/style.css
index 1557499da6..66ce945a68 100644
--- a/style.css
+++ b/style.css
@@ -54,7 +54,7 @@ img {
width: 500px;
margin: 0 auto 0;
}
-.task {
+.todo-task {
width: 56%;
display: inline-block;
flex-grow: 1
From 84fe3b913b7ff12c13843adbb3aa1f997e49570b Mon Sep 17 00:00:00 2001
From: Amrillo
Date: Wed, 15 Oct 2025 17:35:46 +0500
Subject: [PATCH 19/30] fix(basic-3.4): remove tag selectors from styling
replacing with clasess
---
style.css | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/style.css b/style.css
index 66ce945a68..c8e2b32297 100644
--- a/style.css
+++ b/style.css
@@ -28,7 +28,7 @@ button {
button:hover {
color: #3a3A3a;
}
-li > * {
+.todo-item > * {
vertical-align: middle;
}
.header {
@@ -72,7 +72,7 @@ img {
margin: 0 0 20px;
text-transform: uppercase;
}
-input[type="text"] {
+.input-task {
margin: 0;
font-size: 18px;
line-height: 18px;
@@ -84,7 +84,7 @@ input[type="text"] {
font-family: Lato, sans-serif;
color: #888;
}
-input[type="text"]:focus {
+.input-task:focus {
color: #333;
}
/* New Task */
@@ -109,7 +109,7 @@ input#new-task {
font-size: 18px;
width: 226px;
}
-.todo-item > input[type="text"] {
+.todo-item > .input-task {
width: 226px
}
@@ -127,11 +127,11 @@ ul#completed-tasks label {
color: #888;
}
/* Edit Task */
-ul .todo-item input[type=text] {
+ul .todo-item .input-task {
display: none
}
-ul .edit-mode input[type=text] {
+ul .edit-mode .input-task {
display: inline-block;
width: 224px
}
From d781547a80b118d3db3a19bfaf51bc0eb36e2dc9 Mon Sep 17 00:00:00 2001
From: Amrillo
Date: Wed, 15 Oct 2025 17:36:50 +0500
Subject: [PATCH 20/30] fix(no-rule): make some changes due to the removing tag
selector
---
app.js | 8 ++++----
index.html | 14 +++++++-------
2 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/app.js b/app.js
index 2daf05fc97..97de98325f 100644
--- a/app.js
+++ b/app.js
@@ -31,15 +31,15 @@ var createNewTaskElement=function(taskString){
//button.delete
var deleteButton=document.createElement("button");//delete button
var deleteButtonImg=document.createElement("img");//delete button image
- listItem.className = 'todo-item';
-
+ listItem.className='todo-item';
+
label.innerText=taskString;
- label.className='task';
+ label.className='todo-task';
//Each elements, needs appending
checkBox.type="checkbox";
editInput.type="text";
- editInput.className="task";
+ editInput.className="todo-task input-task";
editButton.innerText="Edit"; //innerText encodes special characters, HTML does not.
editButton.className="edit";
diff --git a/index.html b/index.html
index 633221625c..85ba00f6e5 100644
--- a/index.html
+++ b/index.html
@@ -14,7 +14,7 @@
@@ -23,8 +23,8 @@
Todo
-
-
-
+
+
-
-
-
+
+
@@ -34,8 +34,8 @@ Todo
- Save
-
+ Save
+
@@ -48,8 +48,8 @@ Completed
- Edit
-
+ Edit
+
From 8a962f2f6792f2912214459b80b4f69916399f25 Mon Sep 17 00:00:00 2001
From: Amrillo
Date: Wed, 15 Oct 2025 17:51:16 +0500
Subject: [PATCH 23/30] fix(basic-1.3):add double quotes
---
index.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/index.html b/index.html
index 7b346e9a75..19ec92cf79 100644
--- a/index.html
+++ b/index.html
@@ -34,7 +34,7 @@ Todo
- Save
+ Save
From eb7dc259c331afabc3278d924a6b6ba5e0208095 Mon Sep 17 00:00:00 2001
From: Amrillo
Date: Wed, 15 Oct 2025 17:53:49 +0500
Subject: [PATCH 24/30] refactor(basic-2.5): break long lines into multiple to
improve code readibility
---
index.html | 24 +++++++++++++++++++-----
1 file changed, 19 insertions(+), 5 deletions(-)
diff --git a/index.html b/index.html
index 19ec92cf79..afb0965f02 100644
--- a/index.html
+++ b/index.html
@@ -8,13 +8,20 @@
@@ -24,7 +31,9 @@ Todo
-
-
+
Edit
@@ -33,7 +42,10 @@ Todo
-
-
+
Save
@@ -47,7 +59,9 @@ Completed
-
-
+
Edit
From e14473c712851db1c8ead6b5a69739344d8c1893 Mon Sep 17 00:00:00 2001
From: Amrillo
Date: Wed, 15 Oct 2025 17:56:44 +0500
Subject: [PATCH 25/30] fix(basic-2.3): remove named characters
---
index.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/index.html b/index.html
index afb0965f02..0df272956d 100644
--- a/index.html
+++ b/index.html
@@ -11,7 +11,7 @@
- Want more details?
+ Want more details?
From 6515e9d75ae37f020b74bf6b6fdca24c30cbb086 Mon Sep 17 00:00:00 2001
From: Amrillo
Date: Thu, 16 Oct 2025 10:00:23 +0500
Subject: [PATCH 26/30] refactor(extended-1.2): add alt attributes for img tags
for accessibility
---
index.html | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/index.html b/index.html
index 0df272956d..a5b84b1ee3 100644
--- a/index.html
+++ b/index.html
@@ -7,7 +7,7 @@
-
@@ -48,7 +48,7 @@
Todo
class="todo-task input-task">
Save
-
+
@@ -64,7 +64,7 @@ Completed
class="todo-task input-task">
Edit
-
+
From 1046c2a36b5cf0d8c6d278651c7521f7e941eced Mon Sep 17 00:00:00 2001
From: Amrillo
Date: Thu, 16 Oct 2025 10:56:55 +0500
Subject: [PATCH 27/30] fix(basic-3.4,3.1): remove tag selectors and add single
styling for classes
---
style.css | 18 ++++++++----------
1 file changed, 8 insertions(+), 10 deletions(-)
diff --git a/style.css b/style.css
index 16ed61eb53..b3bbb242f0 100644
--- a/style.css
+++ b/style.css
@@ -88,7 +88,7 @@ img {
color: #333;
}
/* New Task */
-input#new-task {
+#new-task {
width: 318px;
}
/* Task list */
@@ -100,10 +100,10 @@ input#new-task {
justify-content: space-between;
align-items: center;
}
-.todo-item > input[type="checkbox"] {
+.todo-item-checkbox {
margin: 0 10px;
}
-.todo-item > label {
+.todo-item > label {
padding-left: 10px;
box-sizing: border-box;
font-size: 18px;
@@ -112,26 +112,24 @@ input#new-task {
.todo-item > .input-task {
width: 226px
}
-
-.delete img {
+.remove-icon {
height: 2em;
transform: rotateZ(45deg);
transition: transform 200ms ease-in;
}
-.delete img:hover {
+.remove-icon:hover {
transform: rotateZ(0);
}
/* Completed */
-ul#completed-tasks label {
+.completed-label {
text-decoration: line-through;
color: #888;
}
/* Edit Task */
-ul .todo-item .input-task {
+.todo-item .input-task {
display: none
}
-
-ul .edit-mode .input-task {
+.edit-mode .input-task {
display: inline-block;
width: 224px
}
From 03930bc818aa499574f1bc2d640c6c49822a22c3 Mon Sep 17 00:00:00 2001
From: Amrillo
Date: Thu, 16 Oct 2025 10:59:00 +0500
Subject: [PATCH 28/30] fix(no-rule): make adjustment in html layout due to the
changes in styling
---
index.html | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/index.html b/index.html
index a5b84b1ee3..20e5caf521 100644
--- a/index.html
+++ b/index.html
@@ -29,18 +29,18 @@ Add Item
Todo
@@ -57,14 +57,14 @@ Todo
Completed
From ae1732f38455db788992b9ff62e15a343845a416 Mon Sep 17 00:00:00 2001
From: Amrillo
Date: Thu, 16 Oct 2025 12:09:33 +0500
Subject: [PATCH 29/30] fix(basic-3.4,3.1): remove tag selectors and add single
styling for classes
---
style.css | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/style.css b/style.css
index b3bbb242f0..6e3b4582fb 100644
--- a/style.css
+++ b/style.css
@@ -121,7 +121,7 @@ img {
transform: rotateZ(0);
}
/* Completed */
-.completed-label {
+#completed-tasks .completed-label {
text-decoration: line-through;
color: #888;
}
@@ -133,6 +133,6 @@ img {
display: inline-block;
width: 224px
}
-ul .edit-mode label {
+.edit-mode .edit-mode-label {
display: none;
}
\ No newline at end of file
From d2771087a56aaf363b573620234ed1c4b82edc7c Mon Sep 17 00:00:00 2001
From: Amrillo
Date: Thu, 16 Oct 2025 12:10:21 +0500
Subject: [PATCH 30/30] fix(no-rule): make adjustment in html layout and app.js
due to the changes in styling
---
app.js | 14 +++++++++-----
index.html | 21 +++++++++++++++------
2 files changed, 24 insertions(+), 11 deletions(-)
diff --git a/app.js b/app.js
index dfb68a69aa..67f650e5c4 100644
--- a/app.js
+++ b/app.js
@@ -34,10 +34,11 @@ var createNewTaskElement=function(taskString){
listItem.className='todo-item';
label.innerText=taskString;
- label.className='todo-task';
+ label.className='todo-task completed-label edit-mode-label';
//Each elements, needs appending
- checkBox.type="checkbox";
+ checkBox.type = "checkbox";
+ checkBox.className = 'todo-item-checkbox';
editInput.type="text";
editInput.className="todo-task input-task";
@@ -45,7 +46,8 @@ var createNewTaskElement=function(taskString){
editButton.className="btn edit";
deleteButton.className="btn delete";
- deleteButtonImg.src='./remove.svg';
+ deleteButtonImg.src = './remove.svg';
+ deleteButtonImg.className = 'remove-icon';
deleteButton.appendChild(deleteButtonImg);
@@ -92,10 +94,12 @@ var editTask=function(){
//switch to .editmode
//label becomes the inputs value.
- label.innerText=editInput.value;
+ label.innerText = editInput.value;
+ // label.classList.add('edit-mode-label');
editBtn.innerText="Edit";
}else{
- editInput.value=label.innerText;
+ editInput.value = label.innerText;
+ // label.classList.remove('edit-mode-label');
editBtn.innerText="Save";
}
diff --git a/index.html b/index.html
index 20e5caf521..c1d431cc73 100644
--- a/index.html
+++ b/index.html
@@ -30,18 +30,21 @@ Todo