Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <!DOCTYPE html>
<html lang="ru">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Todo List</title>
    <link rel="stylesheet" href="styles/reset.css">
    <link rel="stylesheet" href="styles/index.css">
    <link rel="preconnect" href="https://fonts.googleapis.com">
    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
    <link href="https://fonts.googleapis.com/css2?family=Lato:wght@400;700&display=swap" rel="stylesheet">
</head>

<body>
    <div class="container">
        <div class="container__inner">
            <div class="types" id="types">
                <div class="types__title active-types " id="Type-All">All</div>
                <div class="types__title" id="Type-Groceries">Groceries</div>
                <div class="types__title" id="Type-College">College</div>
                <div class="types__title" id="Type-Payments">Payments</div>
            </div>
            <div class="categories">
                <div class="all">
                    <div class="all__title" id="all__title">All Tasks</div>
                    <div class="all__div">
                        <div class="all__input">
                            <input type="text" class="all__input-input" id="input-all"
                                placeholder="Add a new task insdie ‘All’ category">
                            <div class="all__input-add" id="add_element">+</div>
                        </div>
                        <div class="all__divpopup" id="all__divpopup">
                            <div class="all__divpopup-title">Task Types</div>
                            <div class="all__divpopup-types">
                                <div class="all__divpopup-category" id="popup-Groceries">Groceries</div>
                                <div class="all__divpopup-category" id="popup-College">College</div>
                                <div class="all__divpopup-category" id="popup-Payments">Payments</div>
                                <div class="all__divpopup-category" id="popup-Uncategorized">Uncategorized</div>
                            </div>
                        </div>
                    </div>
                    <div class="all-tasks" id="all-tasks">
                        <div class="all__tasks">
                            <div class="task" title="task">
                                <div class="task__left" id="hello">
                                    <div class="task__left-status">
                                        <svg class="status__background-red" width="28" height="28" viewBox="0 0 28 28"
                                            fill="none" xmlns="http://www.w3.org/2000/svg">
                                            <rect x="0.5" y="0.5" width="27" height="27" rx="7.5" stroke="#EA5959" />
                                        </svg>
                                        <svg width="20" class="check" height="20" viewBox="0 0 90 65" fill="none"
                                            xmlns="http://www.w3.org/2000/svg">
                                            <path id="check"
                                                d="M31.39 64.52C30.5648 64.5237 29.7472 64.3629 28.9848 64.047C28.2225 63.731 27.5307 63.2663 26.95 62.68L2.80005 38.53C2.21559 37.9467 1.75189 37.2538 1.43552 36.4911C1.11914 35.7284 0.956299 34.9108 0.956299 34.085C0.956299 33.2593 1.11914 32.4416 1.43552 31.6789C1.75189 30.9162 2.21559 30.2233 2.80005 29.64C3.97279 28.4554 5.56781 27.7847 7.23471 27.7754C8.90161 27.766 10.504 28.4186 11.69 29.59L11.7401 29.64L31.44 49.34L78.32 2.46999C78.9034 1.88553 79.5962 1.42186 80.3589 1.10549C81.1217 0.789118 81.9393 0.626274 82.765 0.626274C83.5908 0.626274 84.4084 0.789118 85.1711 1.10549C85.9339 1.42186 86.6267 1.88553 87.2101 2.46999C88.3874 3.64767 89.0488 5.24475 89.0488 6.91C89.0488 8.57525 88.3874 10.1723 87.2101 11.35L35.89 62.67C35.3017 63.2636 34.6004 63.7331 33.8275 64.0509C33.0545 64.3686 32.2257 64.5282 31.39 64.52V64.52Z"
                                                fill="#EA5959" />
                                        </svg>  
                                    </div>
                                    <div class="task__left-title">Get a new helmet</div>
                                    <div class="task__left-category">Uncategorized</div>
                                </div>
                                <div class="task__right">
                                    <div class="task__right-delete"><svg width="16" class="svg" height="18"
                                            viewBox="0 0 16 18" fill="none" xmlns="http://www.w3.org/2000/svg">
                                            <path
                                                d="M5.66667 3.33333L6.25 1H9.75L10.3333 3.33333M15 3.33333H2.16667L3.33333 17.3333H12.6667L13.8333 3.33333H1H15ZM8 6.83333V13.8333V6.83333ZM10.9167 6.83333L10.3333 13.8333L10.9167 6.83333ZM5.08333 6.83333L5.66667 13.8333L5.08333 6.83333Z"
                                                stroke="#FF0000" stroke-linecap="round" stroke-linejoin="round" />
                                        </svg></div>
                                </div>
                            </div>
                            <div class="task" title="task">
                                <div class="task__left">
                                    <div class="task__left-status"><svg class="status__background-red" width="28"
                                            height="28" viewBox="0 0 28 28" fill="none"
                                            xmlns="http://www.w3.org/2000/svg">
                                            <rect x="0.5" y="0.5" width="27" height="27" rx="7.5" stroke="#EA5959" />
                                        </svg>
                                        <svg width="20" class="check" height="20" viewBox="0 0 90 65" fill="none"
                                            xmlns="http://www.w3.org/2000/svg">
                                            <path
                                                d="M31.39 64.52C30.5648 64.5237 29.7472 64.3629 28.9848 64.047C28.2225 63.731 27.5307 63.2663 26.95 62.68L2.80005 38.53C2.21559 37.9467 1.75189 37.2538 1.43552 36.4911C1.11914 35.7284 0.956299 34.9108 0.956299 34.085C0.956299 33.2593 1.11914 32.4416 1.43552 31.6789C1.75189 30.9162 2.21559 30.2233 2.80005 29.64C3.97279 28.4554 5.56781 27.7847 7.23471 27.7754C8.90161 27.766 10.504 28.4186 11.69 29.59L11.7401 29.64L31.44 49.34L78.32 2.46999C78.9034 1.88553 79.5962 1.42186 80.3589 1.10549C81.1217 0.789118 81.9393 0.626274 82.765 0.626274C83.5908 0.626274 84.4084 0.789118 85.1711 1.10549C85.9339 1.42186 86.6267 1.88553 87.2101 2.46999C88.3874 3.64767 89.0488 5.24475 89.0488 6.91C89.0488 8.57525 88.3874 10.1723 87.2101 11.35L35.89 62.67C35.3017 63.2636 34.6004 63.7331 33.8275 64.0509C33.0545 64.3686 32.2257 64.5282 31.39 64.52V64.52Z"
                                                fill="#EA5959" />
                                        </svg>
                                    </div>
                                    <div class="task__left-title">Purchase Milk & Corn Flakes</div>
                                    <div class="task__left-category">Groceries</div>
                                </div>
                                <div class="task__right">
                                    <div class="task__right-delete"><svg class="svg" width="16" height="18"
                                            viewBox="0 0 16 18" fill="none" xmlns="http://www.w3.org/2000/svg">
                                            <path
                                                d="M5.66667 3.33333L6.25 1H9.75L10.3333 3.33333M15 3.33333H2.16667L3.33333 17.3333H12.6667L13.8333 3.33333H1H15ZM8 6.83333V13.8333V6.83333ZM10.9167 6.83333L10.3333 13.8333L10.9167 6.83333ZM5.08333 6.83333L5.66667 13.8333L5.08333 6.83333Z"
                                                stroke="#FF0000" stroke-linecap="round" stroke-linejoin="round" />
                                        </svg></div>
                                </div>
                            </div>
                        </div>
                    </div>
                <div class="groceries-tasks">
                    <div class="all__tasks">
                        
                    </div>
                </div>
                <div class="college-tasks">
                    <div class="all__tasks">
                        <div class="task" title="task">
                            <div class="task__left">
                                <div class="task__left-status"><svg class="status__background-red" width="28" height="28" viewBox="0 0 28 28"
                                    fill="none" xmlns="http://www.w3.org/2000/svg">
                                    <rect x="0.5" y="0.5" width="27" height="27" rx="7.5" stroke="#EA5959" />
                                </svg> 
                                    <svg width="20" class="check" height="20" viewBox="0 0 90 65" fill="none"
                                        xmlns="http://www.w3.org/2000/svg">
                                        <path
                                            d="M31.39 64.52C30.5648 64.5237 29.7472 64.3629 28.9848 64.047C28.2225 63.731 27.5307 63.2663 26.95 62.68L2.80005 38.53C2.21559 37.9467 1.75189 37.2538 1.43552 36.4911C1.11914 35.7284 0.956299 34.9108 0.956299 34.085C0.956299 33.2593 1.11914 32.4416 1.43552 31.6789C1.75189 30.9162 2.21559 30.2233 2.80005 29.64C3.97279 28.4554 5.56781 27.7847 7.23471 27.7754C8.90161 27.766 10.504 28.4186 11.69 29.59L11.7401 29.64L31.44 49.34L78.32 2.46999C78.9034 1.88553 79.5962 1.42186 80.3589 1.10549C81.1217 0.789118 81.9393 0.626274 82.765 0.626274C83.5908 0.626274 84.4084 0.789118 85.1711 1.10549C85.9339 1.42186 86.6267 1.88553 87.2101 2.46999C88.3874 3.64767 89.0488 5.24475 89.0488 6.91C89.0488 8.57525 88.3874 10.1723 87.2101 11.35L35.89 62.67C35.3017 63.2636 34.6004 63.7331 33.8275 64.0509C33.0545 64.3686 32.2257 64.5282 31.39 64.52V64.52Z"
                                            fill="#EA5959" />
                                    </svg>
                                </div>
                                <div class="task__left-title">Purchase Milk & Corn Flakes</div>
                                <div class="task__left-category">Groceries</div>
                            </div>
                            <div class="task__right">
                                <div class="task__right-delete"><svg width="16" height="18" viewBox="0 0 16 18"
                                        fill="none" xmlns="http://www.w3.org/2000/svg">
                                        <path
                                            d="M5.66667 3.33333L6.25 1H9.75L10.3333 3.33333M15 3.33333H2.16667L3.33333 17.3333H12.6667L13.8333 3.33333H1H15ZM8 6.83333V13.8333V6.83333ZM10.9167 6.83333L10.3333 13.8333L10.9167 6.83333ZM5.08333 6.83333L5.66667 13.8333L5.08333 6.83333Z"
                                            stroke="#FF0000" stroke-linecap="round" stroke-linejoin="round" />
                                    </svg></div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="payments-tasks">
                    <div class="all__tasks">
                        <div class="task" title="task">
                            <div class="task__left">
                                <div class="task__left-status"><svg class="status__background-red" width="28"
                                        height="28" viewBox="0 0 28 28" fill="none" xmlns="http://www.w3.org/2000/svg">
                                        <rect x="0.5" y="0.5" width="27" height="27" rx="7.5" stroke="#EA5959" />
                                    </svg>
                                    <svg width="20" class="check" height="20" viewBox="0 0 90 65" fill="none"
                                        xmlns="http://www.w3.org/2000/svg">
                                        <path
                                            d="M31.39 64.52C30.5648 64.5237 29.7472 64.3629 28.9848 64.047C28.2225 63.731 27.5307 63.2663 26.95 62.68L2.80005 38.53C2.21559 37.9467 1.75189 37.2538 1.43552 36.4911C1.11914 35.7284 0.956299 34.9108 0.956299 34.085C0.956299 33.2593 1.11914 32.4416 1.43552 31.6789C1.75189 30.9162 2.21559 30.2233 2.80005 29.64C3.97279 28.4554 5.56781 27.7847 7.23471 27.7754C8.90161 27.766 10.504 28.4186 11.69 29.59L11.7401 29.64L31.44 49.34L78.32 2.46999C78.9034 1.88553 79.5962 1.42186 80.3589 1.10549C81.1217 0.789118 81.9393 0.626274 82.765 0.626274C83.5908 0.626274 84.4084 0.789118 85.1711 1.10549C85.9339 1.42186 86.6267 1.88553 87.2101 2.46999C88.3874 3.64767 89.0488 5.24475 89.0488 6.91C89.0488 8.57525 88.3874 10.1723 87.2101 11.35L35.89 62.67C35.3017 63.2636 34.6004 63.7331 33.8275 64.0509C33.0545 64.3686 32.2257 64.5282 31.39 64.52V64.52Z"
                                            fill="#EA5959" />
                                    </svg>
                                </div>
                                <div class="task__left-title">32132213123</div>
                                <div class="task__left-category">Groceries</div>
                            </div>
                            <div class="task__right">
                                <div class="task__right-delete"><svg width="16" height="18" viewBox="0 0 16 18"
                                        fill="none" xmlns="http://www.w3.org/2000/svg">
                                        <path
                                            d="M5.66667 3.33333L6.25 1H9.75L10.3333 3.33333M15 3.33333H2.16667L3.33333 17.3333H12.6667L13.8333 3.33333H1H15ZM8 6.83333V13.8333V6.83333ZM10.9167 6.83333L10.3333 13.8333L10.9167 6.83333ZM5.08333 6.83333L5.66667 13.8333L5.08333 6.83333Z"
                                            stroke="#FF0000" stroke-linecap="round" stroke-linejoin="round" />
                                    </svg></div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <!-- <div class="delete">Delete</div> -->
    </div>
    </div>
    <script src="js/index.js"></script>
</body>

</html>
              
            
!

CSS

              
                body {
  background-color: #EA5959;
  font-family: 'Lato', sans-serif;
}

.container {
  height: 100vh;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
}

.container__inner {
  background-color: #fff;
  max-width: 1000px;
  width: 100%;
  padding: 0 43px 0 51px;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  border-radius: 8px;
  -webkit-box-shadow: 7px 13px 8px -1px rgba(0, 0, 0, 0.2);
          box-shadow: 7px 13px 8px -1px rgba(0, 0, 0, 0.2);
}

.types {
  border-right: 1px solid #D8D8D8;
  padding: 139px 63px 387px 0;
  font-weight: 700;
  font-size: 22px;
  line-height: 26px;
  color: #525252;
}

.types__title:nth-child(1n) {
  margin-bottom: 24px;
}

.categories {
  max-width: 700px;
  width: 100%;
  -webkit-transition: ease-in-out;
  transition: ease-in-out;
}

.categories .all {
  position: relative;
  font-weight: 400;
  margin: 70px 43px auto 53px;
}

.categories .all-tasks {
  display: block;
}

.categories .all__title {
  color: #000;
  font-weight: 700;
  font-size: 31px;
  line-height: 37px;
  margin-bottom: 25px;
}

.categories .all__input {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: justify;
      -ms-flex-pack: justify;
          justify-content: space-between;
  background-color: #F3F3F3;
  border-radius: 8px;
  margin-bottom: 35px;
  padding: 10px 20px 10px 27px;
  width: 96%;
}

.categories .all__input-input {
  border: none;
  outline: none;
  color: #525252;
  background-color: #F3F3F3;
  width: 75%;
}

.categories .all__input-add {
  font-size: 30px;
  color: #FF0000;
  font-weight: 750;
  -webkit-user-select: none;
     -moz-user-select: none;
      -ms-user-select: none;
          user-select: none;
  -webkit-transition: all .3s;
  transition: all .3s;
}

.categories .all__divpopup {
  opacity: 0;
  -webkit-transition: opacity .3s;
  transition: opacity .3s;
  position: absolute;
  top: -60px;
  right: -200px;
  max-width: 200px;
  width: 100%;
  border: 4px solid #EA5959;
  border-radius: 6px;
  padding: 7px;
}

.categories .all__divpopup-title {
  color: #000;
  font-weight: 700;
  font-size: 23px;
  text-align: center;
  line-height: 37px;
  margin-bottom: 5px;
}

.categories .all__divpopup-types {
  display: -ms-grid;
  display: grid;
  -ms-grid-columns: 1fr 1fr;
      grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.categories .all__divpopup-category {
  border-radius: 4px;
  background: #EA5959;
  color: #fff;
  padding: 3px;
  font-size: 13px;
}

.categories .task {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: justify;
      -ms-flex-pack: justify;
          justify-content: space-between;
}

.categories .task__left {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  gap: 18px;
}

.categories .task__left-status {
  z-index: 2;
  cursor: pointer;
  position: relative;
  max-height: 28px;
  height: 100%;
  z-index: 3;
}

.categories .task__left-status .status__background-red {
  -webkit-transition: background-color .3s;
  transition: background-color .3s;
  border-radius: 30%;
  z-index: 0;
}

.categories .task__left-status .check {
  -webkit-transition: opacity .3s;
  transition: opacity .3s;
  position: absolute;
  opacity: 0;
  left: 14%;
  top: 20%;
  z-index: 1;
}

.categories .task__left-title {
  margin-top: 2%;
  color: #5A5A5A;
  font-size: 18px;
  line-height: 22px;
}

.categories .task__left-category:nth-child(1n) {
  margin-bottom: 2%;
}

.categories .task__left-category {
  margin-top: 2%;
  font-size: 12px;
  line-height: 14px;
  padding: 5px 19px;
  background-color: #EA5959;
  border-radius: 4px;
  color: #fff;
}

.categories .task__right {
  max-height: 18px;
  margin-top: 1%;
  cursor: pointer;
}

.categories .task__right-delete {
  z-index: 3;
}

.categories .task__right .svg {
  z-index: -3;
}

.active-types {
  color: #EA5959;
}

.active-popup {
  opacity: 1 !important;
}

.transform45deg {
  -webkit-transform: rotate(45deg);
          transform: rotate(45deg);
}

.status__background-white {
  background-color: #fff !important;
}

.active-check {
  opacity: 1 !important;
}
/*# sourceMappingURL=index.css.map */
              
            
!

JS

              
                // Dom Elements
const input_all = document.getElementById('input-all')
const popup = document.getElementById('all__divpopup')
const all_title = document.getElementById('all__title')

//task-types-left
const all = document.getElementById('Type-All')
const groceries = document.getElementById('Type-Groceries')
const college = document.getElementById('Type-College')
const payments = document.getElementById('Type-Payments')

//tasks
const all_tasks = document.getElementById('all-tasks')
const groceries_tasks = document.querySelector('.groceries-tasks')
const college_tasks = document.querySelector('.college-tasks')
const payments_tasks = document.querySelector('.payments-tasks')

//popup types
const popup_groceries = document.getElementById('popup-Groceries')
const popup_college = document.getElementById('popup-College')
const popup_payments = document.getElementById('popup-Payments')
const popup_uncategorized = document.getElementById('popup-Uncategorized')

//clickable
const add_element = document.getElementById('add_element')

//add or delete new element
add_element.addEventListener('click', () => {
    add_element.classList.toggle('transform45deg')
    popup.classList.toggle('active-popup')
    popup_groceries.addEventListener('click', (event) => {
        if (input_all.value.length > 0 && input_all.value.length < 52 && popup.classList.contains('active-popup')) {
            addNewTask(groceries_tasks)

        }
    })
    popup_college.addEventListener('click', (event) => {
        if (input_all.value.length > 0 && input_all.value.length < 52 && popup.classList.contains('active-popup')) {
            addNewTask(college_tasks)

        }
    })
    popup_payments.addEventListener('click', (event) => {
        if (input_all.value.length > 0 && input_all.value.length < 52 && popup.classList.contains('active-popup')) {
            addNewTask(payments_tasks)

        }
    })
    popup_uncategorized.addEventListener('click', (event) => {
        if (input_all.value.length > 0 && input_all.value.length < 52 && popup.classList.contains('active-popup')) {
            addNewTask(all_tasks)
        }
    })

})
deleteTask()
activeCheck()

//switch types
all_tasks.style.display = 'block'
groceries_tasks.style.display = 'none'
college_tasks.style.display = 'none'
payments_tasks.style.display = 'none'
all.addEventListener('click', () => {
    deleteActiveClass()
    all.classList.add('active-types')
    all_tasks.style.display = 'block'
    all_title.innerHTML = 'All Tasks'
    input_all.placeholder = 'Add a new task insdie ‘All’ category'
})
groceries.addEventListener('click', () => {
    deleteActiveClass()
    groceries.classList.add('active-types')
    groceries_tasks.style.display = 'block'
    all_title.innerHTML = 'Groceries Tasks'
    input_all.placeholder = 'Add a new task insdie ‘Groceries’ category'

})
college.addEventListener('click', () => {
    deleteActiveClass()
    college.classList.add('active-types')
    college_tasks.style.display = 'block'
    all_title.innerHTML = 'College Tasks'
    input_all.placeholder = 'Add a new task insdie ‘College’ category'

})
payments.addEventListener('click', () => {
    deleteActiveClass()
    payments.classList.add('active-types')
    payments_tasks.style.display = 'block'
    all_title.innerHTML = 'Payments Tasks'
    input_all.placeholder = 'Add a new task insdie ‘Payments’ category'

})

//functions helpers
function deleteActiveClass() {
    all.classList.remove('active-types')
    groceries.classList.remove('active-types')
    college.classList.remove('active-types')
    payments.classList.remove('active-types')
    all_tasks.style.display = 'none'
    groceries_tasks.style.display = 'none'
    college_tasks.style.display = 'none'
    payments_tasks.style.display = 'none'
}

function addNewTask(type_of_task) {
    html_task = `<div class="task" title="task">
    <div class="task__left">
    <div class="task__left-status"><svg class="status__background-red" width="28"
    height="28" viewBox="0 0 28 28" fill="none"
    xmlns="http://www.w3.org/2000/svg">
    <rect x="0.5" y="0.5" width="27" height="27" rx="7.5" stroke="#EA5959" />
    </svg>
            <svg width="20" class="check" height="20" viewBox="0 0 90 65" fill="none"
                xmlns="http://www.w3.org/2000/svg">
                <path
                d="M31.39 64.52C30.5648 64.5237 29.7472 64.3629 28.9848 64.047C28.2225 63.731 27.5307 63.2663 26.95 62.68L2.80005 38.53C2.21559 37.9467 1.75189 37.2538 1.43552 36.4911C1.11914 35.7284 0.956299 34.9108 0.956299 34.085C0.956299 33.2593 1.11914 32.4416 1.43552 31.6789C1.75189 30.9162 2.21559 30.2233 2.80005 29.64C3.97279 28.4554 5.56781 27.7847 7.23471 27.7754C8.90161 27.766 10.504 28.4186 11.69 29.59L11.7401 29.64L31.44 49.34L78.32 2.46999C78.9034 1.88553 79.5962 1.42186 80.3589 1.10549C81.1217 0.789118 81.9393 0.626274 82.765 0.626274C83.5908 0.626274 84.4084 0.789118 85.1711 1.10549C85.9339 1.42186 86.6267 1.88553 87.2101 2.46999C88.3874 3.64767 89.0488 5.24475 89.0488 6.91C89.0488 8.57525 88.3874 10.1723 87.2101 11.35L35.89 62.67C35.3017 63.2636 34.6004 63.7331 33.8275 64.0509C33.0545 64.3686 32.2257 64.5282 31.39 64.52V64.52Z"
                fill="#EA5959" />
                </svg>
                </div>
                <div class="task__left-title">${input_all.value}</div>
                <div class="task__left-category">${event.target.innerHTML}</div>
                </div>
                <div class="task__right">
                <div class="task__right-delete"><svg width="16" height="18" viewBox="0 0 16 18"
                fill="none" xmlns="http://www.w3.org/2000/svg">
                <path
                d="M5.66667 3.33333L6.25 1H9.75L10.3333 3.33333M15 3.33333H2.16667L3.33333 17.3333H12.6667L13.8333 3.33333H1H15ZM8 6.83333V13.8333V6.83333ZM10.9167 6.83333L10.3333 13.8333L10.9167 6.83333ZM5.08333 6.83333L5.66667 13.8333L5.08333 6.83333Z"
                stroke="#FF0000" stroke-linecap="round" stroke-linejoin="round" />
                </svg></div>
                </div>
                </div>`
    type_of_task.insertAdjacentHTML('beforeend', html_task)
    popup.classList.toggle('active-popup')
    add_element.classList.toggle('transform45deg')
    deleteTask()
    activeCheck()
    // type_of_task =='all_tasks'?console.log(type_of_task):all_tasks.insertAdjacentHTML('beforeend', html_task)
    input_all.value = ''
}

function deleteTask() {
    const delete_task = document.querySelectorAll('.task__right')
    for (i = 0; i < delete_task.length; i++) {
        delete_task[i].addEventListener('click', (event) => {
            const closest = event.target.closest('div[title]')
            closest.innerHTML = ''
        })
    }
}

function activeCheck() {
    const check = document.querySelectorAll('.check')
    for (i = 0; i < check.length; i++) {
        check[i].addEventListener('click', (event) => {
            event.target.classList.toggle('active-check')
        })
    }
}
              
            
!
999px

Console