CSS 2 Flashcards

1
Q

What are the four components of “the Cascade”?

A

source order, inheritance, specificity, !important

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

What does the term “source order” mean with respect to CSS?

A

the order that your CSS rules are written in your stylesheet, rules that are lower have higher priority

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

How is it possible for the styles of an element to be applied to its children as well without an additional CSS rule?

A

inheritance occurs

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

List the three selector types in order of increasing specificity.

A

type selector, class selector, ID selector

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

Why is using !important considered bad practice?

A

it makes debugging more difficult by breaking the natural cascading in your stylesheets

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

What does the transform property do?

A

rotates, scales, skews, or translates an element

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

Give four examples of CSS transform functions.

A

rotate(), scale(), skew(), translate()

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

The transition property is shorthand for which four CSS properties?

A

transition-property, duration, timing, delay

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

Give two examples of media features that you can query in an @media rule.

A

width, height

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

Which HTML meta tag is used in mobile-responsive web pages?

A

viewport meta element

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

What is the effect of setting an element to display: none?

A

element and descendant elements are hidden, not rendered at all

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

What is a breakpoint in responsive Web design?

A

point at which we choose to restructure layout

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

What is the advantage of using a percentage (e.g. 50%) width instead of a fixed (e.g. px) width for a “column” class in a responsive layout?

A

column will dynamically fit with percentage of page

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

If you introduce CSS rules for a smaller min-width after the styles for a larger min-width in your style sheet, the CSS rules for the smaller min-width will “win”. Why is that?

A

source order

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