Skip to content

tailwind extra styles #714

Closed Answered by H-Hp
D-Forz asked this question in Q&A
Jun 15, 2024 · 4 comments · 7 replies
Discussion options

You must be logged in to vote

It seems that you were facing an issue with the Tailwind CSS styles for the pagination links in your Rails application, and you found a solution by modifying the CSS styles.

The initial code block you provided:

a:not(.gap) {
    @apply block rounded-lg px-3 py-1 bg-gray-200;
    &:hover {
      @apply bg-gray-300;
    }
}

This code applies some base styles to the pagination links (a tags) using the Tailwind CSS utility classes. The &:hover part is a nested CSS selector that targets the hover state of the links and applies a different background color (bg-gray-300) when hovered.

However, in the modified version that worked for you:

a:not(.gap) {
    @apply block rounded-lg px-3 py-1 bg-gra…

Replies: 4 comments 7 replies

Comment options

You must be logged in to vote
1 reply
@D-Forz
Comment options

Comment options

You must be logged in to vote
3 replies
@D-Forz
Comment options

@ddnexus
Comment options

@ddnexus
Comment options

Answer selected by ddnexus
Comment options

You must be logged in to vote
1 reply
@ddnexus
Comment options

Comment options

You must be logged in to vote
2 replies
@benkoshy
Comment options

@pokonski
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
6 participants