CSS Flashcards

1
Q

Transform

A

translate, rotate and scale

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

Position: static

A

Default value of the browser

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

Position: relative

A

The element is positioned according to the normal flow of the document, and then offset relative to itself based on the values of top, right, bottom, and left.

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

Position: Absolute

A

The element is removed from the normal document flow, and no space is created for the element in the page layout. It is positioned relative to its closest positioned ancestor, if any

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

Position: Fixed

A

he element is removed from the normal document flow, and no space is created for the element in the page layout. It is positioned relative to the initial containing block established by the viewport,

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

Position: Sticky

A

The element is positioned according to the normal flow of the document, and then offset relative to its nearest scrolling ancestor and containing block

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

Describe the box model

A

The CSS box model is essentially a box that wraps around every HTML element. It consists of: margins, borders, padding, and the actual content

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

Describe CSS Specificity

A

Specificity is the means by which browsers decide which CSS property values are the most relevant to an element and, therefore, will be applied

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

combinator “>”

A

Matches the direct children of elements matched by the first

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

combinator “+”

A

matches the second element only if it immediately follows the first element, and both are children of the same parent element.

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

combinator “~”

A

General sibling combinator
matches all iterations of the second element, that are following the first element (though not necessarily immediately), and are children of the same parent element.

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

Descendant combinator

A

typically represented by a single space ( ) character — combines two selectors such that elements matched by the second selector are selected if they have an ancestor

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

Media Query: Media types

A

all, print, screen and speech

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

How do you target a printer for media queries?

A

@media print { … }

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

nth-child

A

matches elements based on their position in a group of siblings.

example: ul li:nth-child(2) (will select the second child of that group) duh…

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

Explain hardware acceleration in CSS Performance

A
17
Q

Text gradient example

A
  • webkit-background-clip: text

- webkit-text-fill-color: transparent

18
Q

Create a linear gradient

A

linear-gradient(Ndeg, color %, color %)

19
Q

describe box-sizing CSS property

A

The box-sizing property allows us to include the padding and border in an element’s total width and height.

value: border-box - The width and height properties (and min/max properties) includes content, padding and border