I'm in the process of switching to the Pagy gem for pagination in my app. I'm struggling to understand how to get the styles working.
I've looked at the docs here: https://ddnexus.github.io/pagy/docs/api/stylesheets/, but it isn't clear if the styles are included in the gem, how can I use @import
in my SCSS files to import them?
Can someone give me some help?
Yes, the style is included. However, the included SCSS is static; to use it, you can simply copy and modify it.
The file is located at:
<pagy-gem-root>/stylesheets/pagy.scss
Caveat: I confirm the path with my local Pagy, which is version 8; I do not guarantee it won't change.
Alternatively, the gem provides element variants that are compatible with CSS frameworks, e.g., Bootstrap.
If you have Bootstrap already and use the Bootstrap variant, it will work out of the box.
No further styling setup needed and customization is optional.