Things I typically like to ask during a frontend dev interview
- CSS (see below)
- React pair coding (https://codesandbox.io/s/coding-challenge-template-7gkem1)
Can you explain CSS Specificity?
Which measures do you know? When would you use which one?
- %:
- px:
- em:
- rem:
- vh:
Let’s talk about height - style a div so that it’s the full page height:
Talk about internationalisation - LTR - style a paragraph with a 1em margin at the “end” of the text?
Talk about margins - style a footer
Can you name different positioning “algorithms”? How do they “work”?
- default: static
- initial
- absolute
- fixed
- relative
- sticky
Explain the logic of an absolute element? How will it be positioned (imagine inset: 10px)?
What is a stacking context? What are different ways to create a stacking context?
- Setting
opacity
to a value less than1
- Setting
position
tofixed
orsticky
(No z-index needed for these values!)
- Applying a
mix-blend-mode
other thannormal
- Adding a
z-index
to a child inside adisplay: flex
ordisplay: grid
container
- Using
transform
,filter
,clip-path
, orperspective
- Explicitly creating a context with
isolation: isolate
How do you achieve a container that can overflow on the y-Axis but not on x-Axis?
unfortunately not widely supported yet + border-radius will clip y-axis as well in certain browsers (e.g. chrome, not firefox)
or make a wrapper “outside”