CSS Responsive Flashcards
Widths of your content areas should use _____ units such as _______. This allows the widths to automatically adjust based on the width.
Widths of your content areas should use relative units such as percentages. This allows the widths to automatically adjust based on the width.
When the layout becomes less effective, even when fluid grids are used, it is time to consider _____ ______.
When the layout becomes less effective, even when fluid grids are used, it is time to consider Media Queries.
Media Queries allow Web designers to apply different CSS based on a device’s properties such as ______, _____, _____, and _____ _____.
Media Queries allow Web designers to apply different CSS based on a device’s properties such as width, height, orientation, and pixel ratio.
We can include Media Queries in 3 ways:
1) Call an external stylesheet using the link element
2) Call an external stylesheet using the @import directive
3) Use embedded style elements
Call an external stylesheet using the link element (SYNTAX)
Syntax:
Call an external stylesheet using the @import directive (SYNTAX)
Syntax: @import url(‘file’) logic media and (expression);
@import url(“main.css”);
@import url(“small.css”) screen and (max-width: 480px);
@import url(“med.css”) screen and (max-width: 760px);
Use embedded style elements
Syntax: @media logic media and (expression) {rules}
Within the same CSS file:
h1 {
font-size: 36px;
}
@media screen and (max-width: 480px){ h1 { font-size: 18px; } }
Common breakpoints for media queries:
Extra small <576px Small ≥576px Medium ≥768px Large ≥992px Extra large ≥1200px
While there are recommended breakpoints based on experience, common device attributes, and framework implementations, developers should add media queries when the ________ demands it.
While there are recommended breakpoints based on experience, common device attributes, and framework implementations, developers should add media queries when the content demands it.
Your decisions should be _______-driven.
Your decisions should be content-driven.
Name some common media types:
all-All devices
3d-glasses-3D Scenarios
aural-Screen readers
braille-Braille Tactile devices
embossed-Paged Braille devices
handheld-Device with a small screen / handheld devices
projection-Projection presentations screen
screen-Computer screen (or mobile screen) speech synthesizers
tty-Teletype or similar terminal
tv-Low-resolution display / Television devices
print-Printed output and print preview
(max-_____: 480px) used for browser viewport sizes that are __ ______ than 480px
(max-width: 480px) used for browser viewport sizes that are no wider than 480px
(min-____: 640px) used for browser viewport sizes that are __ _____ 640px
(min-width: 640px) used for browser viewport sizes that are at least 640px
(________: landscape) where value can be landscape or portrait
(orientation: landscape) where value can be landscape or portrait
(____-____:1.5) Target devices based on their pixel density
(pixel-ratio:1.5) Target devices based on their pixel density