Following Atomic Design principles, start from building up the atoms, molecules, organisms and layouts.
Work from Storybook first, without any CMS assumptions.
When implementing a specific component you see that the mobile and desktop layouts are way different - opt for splitting it to file-per-layout to keep the mental overhead lower.
Example (hiding/showing is implemented in the sub-layouts here, but can be done in index too):
Build your website with JavaScript disabled in the browser by default. Enable JavaScript for client-side only rich components.
components/
.
slices
, for Storyblok - blocks
. The code in there uses the mapping layer to bridge the gap.heading-3
.
headline-4
in given breakpoints. If we implemented headline-3
as a custom css class to define how the thing should look across all breakpoints (seems like a good idea at first), now we need to duplicate the element in JSX and start hiding/showing one of the versions for different screen sizes.headline-3
contains a font-size
, font-weight
, line-height
and whatever else? Implement each of those properties in the tailwind config separately. Then in the H3 component, compose the right style.