0
0
Figmabi_tool~10 mins

Resizing rules (hug, fill, fixed) in Figma - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to set a frame's width to automatically adjust to its content size.

Figma
frame.resize({ width: '[1]' })
Drag options to blanks, or click blank then click option'
Aauto
Bfill
Chug
Dfixed
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing 'fixed' which sets a constant size.
Choosing 'fill' which stretches to fill the parent.
2fill in blank
medium

Complete the code to make a child element stretch to fill its parent's width.

Figma
child.resize({ width: '[1]' })
Drag options to blanks, or click blank then click option'
Afill
Bhug
Cfixed
Dauto
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing 'hug' which sizes to content.
Choosing 'fixed' which sets a fixed size.
3fill in blank
hard

Fix the error in the code to set a frame's height to a fixed value of 100 pixels.

Figma
frame.resize({ height: [1] })
Drag options to blanks, or click blank then click option'
A'100px'
B"100"
Cfixed
D100
Attempts:
3 left
💡 Hint
Common Mistakes
Using a string like '100px' which causes errors.
Using the word 'fixed' instead of a number.
4fill in blank
hard

Fill both blanks to set a frame's width to hug content and height to fixed 200 pixels.

Figma
frame.resize({ width: '[1]', height: [2] })
Drag options to blanks, or click blank then click option'
Ahug
Bfill
C200
Dfixed
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'fill' for width which stretches instead of hugging.
Using 'fixed' string instead of a number for height.
5fill in blank
hard

Fill all three blanks to set a child element's width to fill, height to hug, and minimum width fixed at 150.

Figma
child.resize({ width: '[1]', height: '[2]', minWidth: [3] })
Drag options to blanks, or click blank then click option'
Ahug
Bfill
C150
Dfixed
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up 'hug' and 'fill' for width and height.
Using string 'fixed' instead of number for minWidth.