Responsive Web Design Flashcards

1
Q

Terms for mobile first and the opposite?

A

Progressive Enhancement vs Graceful Degredation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Term for viewable area of the browser?

A

Viewport

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

what does max-width vs width property do for images

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What should determine a site’s breakpoints?

A

the design elements of the site (not some pre-defined or standard pixel width)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

what is the difference between REM and EM?

A

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)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

what are the four edges of a box in HTML?

A
  1. content box (innermost box)
  2. padding box (edge is inner edge of border)
  3. border box (edge is outer edge of border)
  4. margin box (edge is outer edge of border + margin)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Define content box and border box

A

content box - edges of container’s content

border box - outer edge of container’s border

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Explain what happens when you set the position of an element to relative and then give one of it’s children position: absolute; ?

A

The interior element is contained within the relative outer element but can share the same space with the outer element

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Name 5 things you can query for using @media queries?

A
  1. width
  2. height
  3. orientation
  4. resolution
  5. Aspect Ratio
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Where should you write your media queries

A

Recommendation is to write them next to the default styling

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

How do you tell the browser to make the viewport the width of the device

A

in a meta tag with this name/value pair:

name=”viewport” content=”width=device-width”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

How do you change styles when javascript is present (enabled)

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is the difference between block, inline-block, and inline?

A
  1. Block - occupies the whole line (and can have height in addition to contents)
  2. Inline - shares line with other elements (and can’t have height property - but can have line-height and margin)
  3. 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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What are three types of Flexbox alignment?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What aligns main Flexbox axis?

A

justify-content

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What does the Flexbox property replace?

A

display: block, inline, table, inline-block, table-cell

17
Q

What are the four flex directions?

A

row, row-reverse, column, column-reverse

18
Q

what are the three flex-wrap values?

A

wrap, no-wrap, wrap-reverse

19
Q

How do you align the secondary axis in a Flexbox?

A

align-items

20
Q

What are the 6 align-content properties for Flexbox?

A
  1. flex-start
  2. flex-end
  3. center
  4. stretch
  5. space-around
  6. space-between
21
Q

Attribute to designate other sources for video?

A
22
Q

Explain tags

A

multiple sub tags inside of an audio or video tag designating different formats of an audio or video file

23
Q

What is a way to wrap a long word in a container?

A

word-wrap: break-word

24
Q

What is a good site to test browser feature support?

A

www.caniuse.com

25
Q

what are the css “child” pseudo-selectors?

A

:first-child, :last-child, :nth-child :nth-last-child

26
Q

What values does :nth-child take?

A
  1. a number designating which child of the parent
  2. “odd” or “even” designating every other child of the parent
  3. (2n + 2) designating a cycle size “2n” and where to start counting “2”. This instance would cycle every other child and start counting at 2`
27
Q

How do you designate gradient direction in CSS?

A

background: linear-gradient(direction, color-stop1, color-stop2, …);
background: linear-gradient(to right, red , yellow);

28
Q

How do you specify multiple background images?

A

background: url(“img.jpg”), url(“img2.jpg”);

29
Q

What are five image filters that CSS offers?

A
  1. filter: opacity(50%);
  2. filter: invert(75%);
  3. filter: hue-rotation(25deg);
  4. filter: drop-shadow(3px 3px 6px #333);
  5. filter: grayscale(.4);
  6. filter: contrast(2);
  7. filter: brightness(2);
  8. filter: url(“img.svg”);
  9. filter: blur(4px);
  10. filter: sepia(.75);
    You can specify multiple like so: filter: blur(4px) invert(75%);
30
Q

What markup is an SVG image?

A

XML

31
Q

What are three CSS animation properties?

A

transition, transform, animate

32
Q

which two CSS animation properties handle motion?

A

transition, animate

33
Q

what are the values of CSS transition

A

What property you want to transition and how long you want the transition to take: transition: width 2s, height 4s;

34
Q

What properties should you name in your transition?

A

only those you plan to animate

35
Q

what are the properties of “transform”

A
  1. translate(x, y) - moves the element
  2. scale(x, y) - makes the element bigger
  3. rotate(angle)
  4. skew(x-angle, y-angle)
36
Q

How can you use classes for progressive enhancement

A

You can add multiple classes to the same element and apply different classes depending on your @media queries

37
Q

How can you change a style mid-way through an animation?

A
using keyframes.
@keyframes rule {
  30% {
    color: "blue";
}
}
38
Q

how do you turn autocomplete off on a form field?

A

autocomplete=”off” inside the element

39
Q

Define “regular expression”

A

a programatic expression checking for proper syntax in a string. Regular expressions are used across programming languages