Which property allows you to control the size of tracks in a grid layout?

  • grid-row: auto;
  • grid-template-columns;
  • grid-template-rows;
  • grid-track: size;
The property that allows you to control the size of tracks (rows and columns) in a grid layout is 'grid-template-columns' for columns and 'grid-template-rows' for rows. These properties let you define the size of the grid tracks using various units like pixels, percentages, or 'fr' units.

What does the CSS property "font-display" control?

  • How much space a font file occupies on the server
  • How quickly a font is loaded and rendered on a web page
  • The color and style of text
  • The size of text
The "font-display" property in CSS controls how web fonts are displayed during loading. It's used to manage the flash of unstyled text (FOUT) or invisible text, making it an essential property for optimizing web font performance. Setting it to "swap" tells the browser to use a system font until the custom font is available, reducing FOUT.

How would you make an animation run indefinitely in CSS?

  • Set animation-iteration to infinite.
  • Set the animation-delay property to a very large value.
  • Use animation-loop property and set it to true.
  • Use the animation-duration property and set it to infinite.
To make an animation run indefinitely in CSS, you should use the animation-duration property and set it to infinite. This property specifies the time it takes for one cycle of the animation, and when set to infinite, it ensures that the animation continues to run indefinitely.

You're working on a responsive design where you want a row of items to wrap onto the next line when there isn't enough space. Which Flexbox properties would you adjust?

  • align-content and flex-basis
  • flex-direction and flex-wrap
  • justify-content and align-items
  • order and flex-grow
To make a row of items wrap onto the next line when there isn't enough space in a Flexbox layout, you would adjust the flex-direction property to "column" (for vertical stacking) and flex-wrap to "wrap." This allows the items to stack vertically when space is limited.

How can you pause an animation before it begins or between iterations?

  • animation-delay
  • animation-hold
  • animation-pause
  • animation-play-state
To pause an animation before it begins or between iterations, you should use the animation-play-state property. By setting it to paused, you can temporarily halt the animation. This is useful for creating interactive animations and controlling when they start or stop.

In terms of specificity, which type of selector has the highest priority?

  • Class selectors
  • Element selectors
  • ID selectors
  • Universal selectors
In terms of specificity, ID selectors have the highest priority. They are more specific than class selectors, element selectors, and universal selectors, and styles defined using ID selectors will override styles defined with lower-specificity selectors.

In the context of CSS masking, what does the mask-composite property do?

  • Combines a mask image with the element using the blend mode specified.
  • Defines the shape of the mask by specifying a path.
  • Determines the transparency of the mask image.
  • Specifies the position of the mask image relative to the masked element.
The mask-composite property in CSS is used to determine how a mask image should be combined with the element it's applied to. It's used to control the blending mode of the mask image with the element, allowing for various effects.

What's the difference between the CSS functions min(), max(), and clamp()?

  • clamp() returns a value between the minimum and maximum values provided as arguments.
  • max() returns the minimum value among its arguments.
  • min() and max() are the same.
  • min() returns the maximum value among its arguments.
In CSS, the min() function returns the minimum value among its arguments, while the max() function returns the maximum value. These two functions are complementary but serve different purposes. The clamp() function, on the other hand, allows you to set a value within a range, ensuring it stays between the minimum and maximum values provided as arguments.

What's the result of applying the grayscale(100%) filter to a colored image?

  • The image becomes completely black
  • The image becomes completely white
  • The image becomes grayscale
  • The image remains the same
Applying the grayscale(100%) filter to a colored image will turn the image completely black. The grayscale filter in CSS converts the image to grayscale, and when you specify 100%, it means full grayscale, which results in a black and white image with all color information removed.

Which CSS value for font-weight represents normal text?

  • Default
  • Lighter
  • Normal
  • Regular
In CSS, the font-weight property is used to control the thickness of the text. The value "normal" corresponds to the standard or regular font weight, making it neither bolder nor lighter.