Media Queries Flashcards

1
Q

How can we use media types

A

they can be an attribute on a link tag

e.g.

The can be an at-media block in a css files

@media print {
font-size: 12pt;
}

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

What media types exist

A

all, braille, embossed, hand-held, print, projection, screen, speech, tty and tv

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

What’s the structure of the media query

A

You specify the media then the query

e.g. @media screen and (min-width: 1024px) {

}

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

What are alternatives to @-media blocks in your css

A

You can query a media attribute on a link

If importing a stylesheet those can be queries

@import url(‘wide.css’) screen and (min-width: 1024px);

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

What’s meant by the following terms:
display area
rendering surface

A

display area - the viewport. Size of browser window miss chrome
rendering surface - size of screen

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

True of false. You can’t query multiple features at once.

A

False. This is perfectly legal. You just join the extra features preceded with an and

@media screen and (min-width: 480px) and (orientation: landscape) {

}

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

What’s the difference between width and device-width

A

width - the viewport. Browser window / display area

device-width - rendering surface / screen size

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

What’s the meta viewport tag about?

A

The iPhone rendered content 980px wide (yet the viewport was 320 pixels wide). The content is rendered and then shrunk down.

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

How do we write a meta tag to tell the browser to render on a one to one basis

A

initial scale sets the zoom to a 100%

By setting width to device width we make the width of the browser viewport equal to the screen size. e.g. makes the iOS device display at device width

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

What does the following media query mean

@media screen and (max-width: 768px)

A

Any screen device with a screen 768 pixels wide or less apply these rules

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

True or false. If I update a selector in my new @media rule this will overwrite all the properties in an earlier rule (i.e. even if I don’t write a rule to change a property stated earlier)

A

False

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

How can we ensure our designs will work ok on devices that don’t support media queries or have javascript disabled?

A

Adopt a mobile first approach.

Define a view for small screen first and then use media queries to scale up the design.

Ties in with idea of progressive enhancement.

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