Media Queries
Usage
Prob a better way to do it
General
Originally had 10 types of browsers that you can ask what is displaying this shit
Problem: Different Sizes
Solution: IF something is something has this size, use this css; If something is landscape, send this css
Don't think about devices, think about sizes that make sense for your design
Specifying Media Queries
OR can put directly in linking tag
Properties
Use min and max or it will just be for that one pixel
(min/max)-width:
(Min/max)-height:
Orientation: potrait(h>w) | landscape(w>h)
(min/max)-resolution: 72dpi | 100dpcm
(min/max)-aspect-ratio:
…..
Media feature: hover does the primary input mechanism allow the user to hover over elements
Resolution Units
dpi: dots per inch(72, 96 serve higher rez images)
Dlcm: dots per centimeter(1dpcm = 2.54dpi)
Dppx: dots per pixel(1dppx=96dpi default image rez)
Syntax
New >= < > like @media (width > 600px)
Can use and, not, and ',' which is or
`media='only screen and (color)'
`media='print, not screen and (color)' //p or not (s & c)
Viewport
SUPER IMPORTANT use this line of CODE at the top of all your files
Something about how some mobile browser actually render sights are largely virtual viewports and then render it down, but this means if you are web optimized it might be fucked up. So this mitigates that or something
Last updated