1.4 Responsive Layouts Flashcards

1
Q

What is responsive website design?

A

It’s creating websites for different device screen sizes.

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

What are the 3 parts of responsive website design?

A

Responsive design consists of fluid grids, fluid images, and media queries

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

Why is responsive website design preferred over traditional techniques?

A

It’s more sustainable as devices and screen sizes have changed greatly over the years.

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

Did early websites take their inspiration from print design?

A

Yes, much of the web initially was based off of print design.

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

Has responsive website design shifted towards absolute or relative sizes?

A

Relative sizing has been preferable given variety of devices.

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

What are units for relative sizes?

A

Relative units are like percentages and EMs.

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

Name 2 percentages for a 2 column layout

A

75%/25% 50%/50% Any combination that equals 100%

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

Which container are percentages relative to?

A

Percentages are relative to parent container size.

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

What is a media query?

A

Media queries are CSS rules that include CSS code only when certain conditions are met.

Media queries are a feature of CSS that enable web page content to adapt to different screen sizes and resolutions.

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

What’s a media feature?

A

Media features are an expression or set of conditions inside of a media query.

Media features provide more specific details to media queries, by allowing to test for a specific feature of the user agent or display device.

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

When would media features apply?

A

For example, you can apply styles to only those screens that are greater, or smaller, than a certain width.

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

What does the media feature of orientation do?

A

It controls the orientation of the viewport

Vertical or Horizontal to improve viewing experience.

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

In the lesson, what happened when the
orientation was changed to landscape?

A

The header size shrank to fit the viewport better.

The aside was visible on the side.

The content required less scrolling to see.

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

Consider the following media query:

There are expressions before and after the boolean operator and. When will this media query be applied?

A

The media query will be applied only if
BOTH expressions are true.

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

What is a logical operator?

A

Logical operators can be used to compose a complex media query, by defining conditions for CSS code rules.

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

What are the 3 logical operators most used?

A

The logical operators not, and, and only can be
used to compose a complex media query.

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

What does the AND logical operator indicate?

A

Both conditions need to be met for the rules to apply.

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

How are commas used in media query declarations?

A

Commas are used to separate multiple media queries to combine the queries into the same rule. In the spirit of DRY, this is writing concise code.

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

Why do layouts break?

A

Breakpoints are widths that no longer works, causing the layout breaks.

20
Q

What’s a mobile first approach?

A
  1. Mobile –>
  2. Tablet –>
  3. Desktop

Add layout changes, features, and content
based on the size of the screen

21
Q

Without media queries what happens to a layout?

A

It remains static and poorly suited for screen sizes.

22
Q

What are the signs you need a breakpoint?

Give 2 examples

A

Line length is too long

Buttons lose proportions

When layout doesn’t work anymore

23
Q

Should content or devices determine the need for breakpoints?

A

Breakpoints define a certain threshold where the layout should change, typically defined by the content (and not by devices).

24
Q

A breakpoint should be created based on the width of popular screen sizes. True or false

A

FALSE

25
Q

Why should breakpoints be used in combination with fluid grids?

A

Elements won’t look good on every screen size.

Example: columns on desktop vs mobile

Layouts break and must be adjusted

26
Q

What is a breakpoint?

A

Media Query adjusts the layout based
on a certain width is a breakpoint

27
Q

What is the practical cost of creating multiple break points?

A

It takes extra time to design and code websites
by having multiple breakpoints.

28
Q

What is pagination?

A

Pagination refers to page order sequence.

29
Q

What are some advantages of using pagination in UI?

A

Usability: Easily recognized method,

Engagement: find items quickly,

Performance: page loads faster

30
Q

What is a flexbox container?

A

It’s the constraint that places the
exterior boundary on flexbox items.

31
Q

What’s the purpose of a flexbox container?

A

The main idea behind the flex layout is to give the container the ability to alter its items’ width/height (and order) to best fill the available space (mostly to accommodate to all kind of display devices and screen sizes).

32
Q

What are flexbox items?

A

These are elements that reside inside of flexbox containers.

33
Q

What does display flex mean?

A

Flex stands for flexible.

When set to display flex it enables flex
context for its direct flex children.

34
Q

What is a navigation breakpoint?

A

Point at which its best to switch from vertical navigation to horizontal navigation based on space available on the device.

35
Q

What is flex direction?

A

It determines in what order and direction
flex items appear inside the container.

36
Q

What are the 4 possible flex-direction values?

A
  1. Column
  2. Column Reverse
  3. Row
  4. Row Reverse
37
Q

What’s the difference between column and column reverse?

A

Columns: forward

Column Reverse: backwards

38
Q

What’s the direction of row?

A

Row moves from left to right.

Reverse moves from right to left.

39
Q

In general, how many columns are recommended for a mobile layout?

A

One column layout for portrait mode on mobile

As it lends itself to scrolling on mobile devices

40
Q

Consider the following media query:

Will this media query be applied if the width of the browser is 768 pixels across?

A

Yes. The min-width media feature is inclusive, so a brower width that is equal to the min width will make the media query true.

41
Q

Which of the following are acceptable values for the media feature orientation?

A

Landscape

42
Q

What is flexbox?

A

Flexbox is a collection of CSS properties for adjusting page layout based on different screensizes.

43
Q

Why is it important to create breakpoints based on content rather than based on popular device screen sizes?

A

If breakpoints are based on popular screen sizes then they will not be ready for devices that have not yet been released

44
Q

In computer programming, two common boolean operators are “and” and “or”. Media queries use the keyword “and”, but how could a media query represent an “or” if there’s no keyword for it?

A

While there is no or keyword, using a comma is practically equivalent.

45
Q
A