Menu

Our site hides every scrollbar, smooth-scrolls for exactly one link, and that link does not scroll
📰

Our site hides every scrollbar, smooth-scrolls for exactly one link, and that link does not scroll

DEV Community: nextjs·Daniel Pertu·14 days ago
#sUmLNmXi
#devtonextjs#devto#dev#how#features
Reading 0:00
15s threshold

pub-trivia.app has one stylesheet of its own. app/globals.css is 117 lines: a Tailwind import, two blocks of design tokens, and then four rules that are not about tokens at all.

@layer base { * { @apply border-border; } html { scroll-behavior : smooth ; } }

/* Hide all scrollbars */ * { scrollbar-width : none ; }

* ::-webkit-scrollbar { display : none ; }

Enter fullscreen mode

Exit fullscreen mode

All four survive into the compiled 86,718-byte stylesheet the browser downloads, three of them unchanged and one with a redundancy removed:

* { border-color : hsl ( var ( --border ))} * { scrollbar-width : none } ::-webkit-scrollbar { display : none } html { scroll-behavior : smooth }

Enter fullscreen mode

Exit fullscreen mode

I counted what * means here. Across the 72 public pages the site serves 20,962 elements, from 114 on the cookie page to 733 on the homepage, a mean of 291.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.