_pagination.scss 2.7 KB
Newer Older
Ooh-Ao committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98
@layer components {
    /* Start Pagination Styles */
    .ti-pagination {
        @apply flex items-center;

        li {
            .page-link {
                @apply border border-gray-200 dark:border-white/10 text-gray-500 dark:text-white/70 hover:text-primary sm:p-3 p-2 inline-flex items-center text-sm font-medium gap-2;

                &.active {
                    @apply bg-primary text-white;
                }
                &.disabled {
                    @apply  pointer-events-none opacity-30;
                }
            }

            &:not(:first-child) .page-link {
                @apply ltr:ml-[calc(1px_*_-1)] rtl:mr-[calc(1px_*_-1)];
            }

            &:first-child .page-link {
                @apply ltr:rounded-l-sm rtl:rounded-r-sm;
            }

            &:last-child .page-link {
                @apply ltr:rounded-r-sm rtl:rounded-l-sm;
            }
        }

        &.pagination-sm {
            li {
                .page-link {
                    @apply py-2 px-2 text-xs;
                }

                &:first-child .page-link {
                    @apply ltr:rounded-l-sm rtl:rounded-r-sm;
                }

                &:last-child .page-link {
                    @apply ltr:rounded-r-sm rtl:rounded-l-sm;
                }
            }
        }

        &.pagination-lg {
            li {
                .page-link {
                    @apply py-3 sm:px-6 px-3 text-lg;
                }

                &:first-child .page-link {
                    @apply ltr:rounded-l-sm rtl:rounded-r-sm;
                }

                &:last-child .page-link {
                    @apply ltr:rounded-r-sm rtl:rounded-l-sm;
                }
            }
        }
    }
    .pagination-style-1 {
        .ti-pagination {
            li {
                @apply space-x-2;
                .page-link {
                    @apply border-0 rounded-md leading-none sm:px-4 px-2;
                }
            }
        }
    }
    .pagination-style-2 {
        .ti-pagination {
            li {
                @apply space-x-2;
                .page-link {
                    @apply border-0 rounded-md leading-none sm:px-4 px-2;
                    &.active {
                        @apply bg-transparent text-primary relative font-bold before:absolute before:h-1 before:w-full before:inset-x-0 before:bottom-0 before:bg-primary;
                    }
                }
            }
        }
    }
    .pagination-style-3 {
        .ti-pagination {
            li {
                @apply space-x-2;
                .page-link {
                    @apply border-0 rounded-full leading-none sm:px-4 px-2;
                }
            }
        }
    }

    /* End Pagination Styles */
}