rewrite table styles from tailwind into scss

This commit is contained in:
smanylov
2025-12-30 13:35:20 +07:00
parent 1032c5420b
commit f16e527a32
4 changed files with 330 additions and 107 deletions
+235
View File
@@ -412,4 +412,239 @@
justify-content: space-between;
flex-wrap: wrap;
gap: 20px;
}
.tanstak-table-wrapper {
padding: 1.5rem;
margin: 0 auto;
.btn-modal {
transition: all 0.3ms ease-in-out;
border-radius: 10px;
padding: 5px 20px;
font-weight: 500;
}
:where(.divide-gray-200 > tr:last-child) {
border-bottom: 1px solid var(--color-gray-200);
}
.tanstak-table-filtres {
display: flex;
flex-direction: column;
justify-content: space-between;
align-items: flex-start;
gap: 1rem;
padding-bottom: 1rem;
padding-top: 0;
padding-left: 0;
padding-right: 0;
@media (min-width: 768px) {
flex-direction: row;
align-items: center;
}
.table-filtres-wrapper {
display: flex;
flex-direction: column;
gap: 1rem;
width: 100%;
@media (min-width: 768px) {
flex-direction: row;
width: auto;
}
.table-filtres-item {
display: flex;
flex-direction: column;
width: 12.5rem;
}
.table-filtres-label {
font-size: 0.875rem;
font-weight: 500;
margin-bottom: 0.25rem;
}
}
}
.tanstak-table-pagination {
display: flex;
flex-direction: column;
align-items: flex-end;
justify-content: space-between;
margin-top: 1.5rem;
gap: 1rem;
@media (min-width: 768px) {
flex-direction: row;
}
.pagination-info {
display: flex;
align-items: center;
gap: 0.5rem;
font-size: 0.875rem;
&-pages {
color: v.$text-p;
}
&-files {
color: v.$text-s;
}
}
.pagination-controls {
display: flex;
align-items: center;
gap: 0.5rem;
.arrow {
padding-left: 0.5rem;
padding-right: 0.5rem;
padding-top: 0.25rem;
padding-bottom: 0.25rem;
border: 1px solid;
border-radius: 0.375rem;
&:hover {
background-color: v.$bg-light;
}
&:disabled {
opacity: 0.5;
cursor: not-allowed;
}
}
&-pages {
display: flex;
align-items: center;
gap: 0.25rem;
button {
border: 1px solid v.$p-color;
padding-left: 0.75rem;
padding-right: 0.75rem;
padding-top: 0.25rem;
padding-bottom: 0.25rem;
border-radius: 0.375rem;
&.current {
background-color: v.$p-color;
color: v.$white;
}
&.other {
&:hover {
background-color: v.$bg-light;
}
}
}
}
}
}
.tanstak-table-block {
width: 100%;
overflow-x: auto;
border-radius: 0.5rem;
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}
.tanstak-table {
width: 100%;
table-layout: fixed;
>*+* {
border-top: 1px solid v.$b-color-2;
}
> :not(:last-child) {
border-bottom: 1px solid v.$b-color-2;
}
@media (min-width: 768px) {
table-layout: auto;
}
&-head {
background-color: v.$b-color-1;
th {
padding-left: 1.5rem;
padding-right: 1.5rem;
padding-top: 0.75rem;
padding-bottom: 0.75rem;
text-align: left;
font-size: 0.75rem;
font-weight: 500;
color: v.$text-p;
text-transform: uppercase;
letter-spacing: 0.05em;
white-space: nowrap;
}
.column {
display: flex;
align-items: center;
justify-content: center;
&.start {
justify-content: start;
}
.sort-button {
margin-left: 0.5rem;
padding: 0.25rem;
border-radius: 0.25rem;
&:hover {
background-color: #e5e7eb;
}
}
}
}
&-body {
background-color: v.$white;
>*+* {
border-top: 1px solid v.$b-color-2;
}
tr {
transition: background-color 0.2s ease-in-out;
&:hover {
background-color: v.$bg-light;
}
}
td {
padding-left: 1.5rem;
padding-right: 1.5rem;
padding-top: 1rem;
padding-bottom: 1rem;
white-space: nowrap;
}
}
}
}
@media (max-width: 1300px) {
.tanstak-table {
max-width: 800px;
margin: 0 auto;
}
}
@media (max-width: 1200px) {
.tanstak-table {
max-width: 500px;
margin: 0 auto;
}
}