Formats HTML, CSS, and JavaScript code
by John Doe
HTML
<div class="product-list">
<div class="product-item">
<img src="https://img.freepik.com/free-psd/top-view-delicious-pizza_23-2151868964.jpg" alt="Pizza" class="image">
<span class="product-name">Pizza</span>
<span class="product-price">25 Ft</span>
<span class="product-quantity">
1 db
</span>
<button class="delete-btn">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="15" fill="none">
<path d="M2 3.71423H14" stroke="#A5AAAE" stroke-width="1.5" stroke-linecap="round"></path>
<path d="M9.28563 2H6.7142C6.24081 2 5.85706 2.38376 5.85706 2.85714V3.71429H10.1428V2.85714C10.1428 2.38376 9.75901 2 9.28563 2Z" stroke="#A5AAAE" stroke-width="1.5"></path>
<path d="M6.71429 10.9999V6.71423" stroke="#A5AAAE" stroke-width="1.5"></path>
<path d="M9.28571 10.9999V6.71423" stroke="#A5AAAE" stroke-width="1.5"></path>
<path d="M11.9228 13.2137C11.886 13.6581 11.5145 14 11.0686 13.9999H4.93199C4.48605 14 4.11457 13.6581 4.07771 13.2137L3.28571 3.71423H12.7143L11.9228 13.2137Z" stroke="#A5AAAE" stroke-width="1.5"></path>
</svg>
</button>
</div>
<div class="product-item">
<img src="https://img.freepik.com/free-psd/close-up-hamburger-isolated_23-2151604186.jpg" alt="Hamburger" class="image">
<span class="product-name">Cheeseburger</span>
<span class="product-price">1800 Ft</span>
<span class="product-quantity">
100 db
</span>
<button class="delete-btn">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="15" fill="none">
<path d="M2 3.71423H14" stroke="#A5AAAE" stroke-width="1.5" stroke-linecap="round"></path>
<path d="M9.28563 2H6.7142C6.24081 2 5.85706 2.38376 5.85706 2.85714V3.71429H10.1428V2.85714C10.1428 2.38376 9.75901 2 9.28563 2Z" stroke="#A5AAAE" stroke-width="1.5"></path>
<path d="M6.71429 10.9999V6.71423" stroke="#A5AAAE" stroke-width="1.5"></path>
<path d="M9.28571...
SCSS
:root {
--border-radius: .5rem;
--border-radius-small: .25rem;
}
*{
box-sizing: border-box;
font-size: 1rem;
font-family: Arial, Helvetica, sans-serif;
}
.product-list {
display: grid;
grid-template-columns: min-content max-content max-content min-content min-content;
gap: 10px;
}
.product-item {
grid-column: 1 / -1;
display: grid;
grid-template-columns: subgrid;
gap: 15px;
background-color: #cdcdf1;
color: #3d3e8b;
padding: 1rem;
border-radius: var(--border-radius);
align-items: center;
.image{
width: 60px;
height: 60px;
}
.product-name{
font-size: 1.25rem;
font-weight: bold;
}
.product-price{
}
.product-quantity{
white-space: nowrap;
.input-number{
background-color: #e2e4fd;
border: 0 solid transparent;
width: 35px;
padding: .25rem;
border-radius: var(--border-radius-small);
}
}
.delete-btn{
background-color: transparent;
border: 0;
}
}