Responsive Web Design Flashcards
(39 cards)
Terms for mobile first and the opposite?
Progressive Enhancement vs Graceful Degredation
Term for viewable area of the browser?
Viewport
what does max-width vs width property do for images
max-width says what percentage of the images native resolution it will be. Width defines what percentage of the container it is in it will take up
What should determine a site’s breakpoints?
the design elements of the site (not some pre-defined or standard pixel width)
what is the difference between REM and EM?
em is a size relative to the default font size (usually 16 px). REM stands for root-em and is also relative to the default font size. The difference is that em’s are also relative to the font size defined in their container (such that .75em inside of a container with .75em font size would be less than .75rem - it would be 75% of the container’s font size)
what are the four edges of a box in HTML?
- content box (innermost box)
- padding box (edge is inner edge of border)
- border box (edge is outer edge of border)
- margin box (edge is outer edge of border + margin)
Define content box and border box
content box - edges of container’s content
border box - outer edge of container’s border
Explain what happens when you set the position of an element to relative and then give one of it’s children position: absolute; ?
The interior element is contained within the relative outer element but can share the same space with the outer element
Name 5 things you can query for using @media queries?
- width
- height
- orientation
- resolution
- Aspect Ratio
Where should you write your media queries
Recommendation is to write them next to the default styling
How do you tell the browser to make the viewport the width of the device
in a meta tag with this name/value pair:
name=”viewport” content=”width=device-width”
How do you change styles when javascript is present (enabled)
You can make one of your first javascript functions be to change the class of elements from one which assumes no javascript (example: class=”no_js”) to one that assumes javascript is present (example: class=”jsWorking”). The class will only change when javascript is present.
What is the difference between block, inline-block, and inline?
- Block - occupies the whole line (and can have height in addition to contents)
- Inline - shares line with other elements (and can’t have height property - but can have line-height and margin)
- Inline-block - sort of a combination of the first two. blocks of content which can have height property but share the line with other elements
What are three types of Flexbox alignment?
justify-content - alignment along primary flexbox axis (horizontal when flex-direction is column)
align-items - alignment along secondary axis (vertical when flex-direction is row)
align-content - alignment of items when there is more than one row (or column) of items.
What aligns main Flexbox axis?
justify-content
What does the Flexbox property replace?
display: block, inline, table, inline-block, table-cell
What are the four flex directions?
row, row-reverse, column, column-reverse
what are the three flex-wrap values?
wrap, no-wrap, wrap-reverse
How do you align the secondary axis in a Flexbox?
align-items
What are the 6 align-content properties for Flexbox?
- flex-start
- flex-end
- center
- stretch
- space-around
- space-between
Attribute to designate other sources for video?
Explain tags
multiple sub tags inside of an audio or video tag designating different formats of an audio or video file
What is a way to wrap a long word in a container?
word-wrap: break-word
What is a good site to test browser feature support?
www.caniuse.com