Responsive design
2022-12-31 html css tailwind responsive youtubeNotes about Tailwind responsive features and how to build web site working nicely on all screen sizes from this video:
- there is five breakpoints:
sm(640px),md(768px),lg(1024px),xl(1280px),2xl(1536px). max-w-mdandmx-autoclasses for centered block with specified maximum width- the prefix can specify the class would apply when we are over the breakpoint size
- utilities
handwfor height and width object-coverandobject-centerto keep aspect ratio of the image and cover parts of image outside boundaries- idea to duplicate some contents and make it
hiddenon some breakpoints - using
gridwithgrid-cols-2to set image next to the text. When using more columns,col-span-nncan put the block over multiple columns - nice way to visualize blocks using
bg-color-nnn, especially in combination with breakpoints. Color palette <br>elements can behidden
It is good to see thinking and workflow on how to define the layout for various screen sizes.