Menu

The 129 elements that only existed once JavaScript loaded
📰

The 129 elements that only existed once JavaScript loaded

DEV Community: react·SAMUELFMEDEIROS·about 3 hours ago
#McJSc1xv
#devtoreact#devto#dev#opacity#html
Reading 0:00
15s threshold

The page that arrived empty

Opening the portfolio with JavaScript blocked should show an ugly but readable site. It showed a frame. The header was in the HTML, the text was in the HTML, and nothing rendered — because almost everything arrived with opacity: 0 baked into the style attribute.

I measured production before touching a single line: 129 tags with inline opacity:0 in the HTML served by portifolio.seu.pet . Sixty of those are absolute layers and decorative grids, which is expected. The rest include real content — section headings, project cards, the hero block itself. The browser received the whole page and the visitor saw the background.

The culprit was not badly written CSS. It was a component pattern that looked harmless and appeared in 52 places across the repository.

The pattern that kept repeating

The portfolio uses framer-motion for entrance animations.…

Continue reading — create a free account

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