If you want an animation to run indefinitely, which value would you set for the animation-iteration-count property?

  • forever
  • infinite
  • loop
  • repeat
To make an animation run indefinitely, you should set the animation-iteration-count property to the value infinite. This ensures that the animation will keep running continuously without a specified end point.

The ______ value of the animation-timing-function property makes the animation progress in a series of jumps, like frames in a flipbook.

  • cubic-bezier
  • ease-in-out
  • linear
  • steps
The steps value of the animation-timing-function property divides the animation into a series of distinct intervals, creating a frame-by-frame animation effect, similar to a flipbook. You specify the number of steps, like steps(4), to control the number of frames.

You're working on a project where you need to apply the same set of styles to multiple elements but with slight variations. How can SASS/SCSS assist you in this scenario?

  • Create a new class for each element with the slight variations in an SCSS file.
  • Use SASS/SCSS variables and create a single class with conditional styles based on these variables.
  • Use inline styles in the HTML for each element.
  • Write separate CSS styles for each element in a standard CSS file.
SASS/SCSS allows you to use variables to define styles and apply them conditionally. In this scenario, you should use SASS/SCSS variables to define common styles and then create a single class with conditional styles based on these variables to apply the slight variations to multiple elements. This promotes code reusability and maintainability.

How would you blend two overlapping elements using the mix-blend-mode property?

  • Adjust the opacity of one element to make it transparent, revealing the element beneath.
  • Apply the mix-blend-mode property to the parent container of the two elements.
  • Mix the colors of the overlapping elements based on the specified blend mode.
  • Use the 'blend' class in HTML to specify the blending mode.
The mix-blend-mode property in CSS is used to control how elements blend when they overlap. It's used to specify how the colors of elements should be mixed, based on a defined blending mode, to create various visual effects.

Which CSS property is used to define a container as a grid layout?

  • display: grid;
  • grid-container
  • grid-style
  • grid-template
To define a container as a grid layout, you should use the display: grid; CSS property. This property tells the browser to treat the specified container as a grid, enabling you to create grid-based layouts within it.

How would you define a custom property (or variable) in CSS?

  • #variable: value;
  • $variable: value;
  • --variable: value;
  • @variable: value;
To define a custom property (or variable) in CSS, you use the format --variable: value;. Custom properties start with a double hyphen (--) and are followed by the property name, a colon, and the value. These custom properties can then be used to store and reuse values throughout your stylesheet.

To run animations in reverse order after they complete, the value for animation-direction should be ________.

  • alternate
  • backwards
  • normal
  • reverse
The value for the animation-direction property determines how animations behave after they complete. To run animations in reverse order after completion, you should set animation-direction to reverse. This will play the animation backward.

You are designing a responsive website and want a box to always be 10% of the viewport width. Which CSS value would you use?

  • %
  • em
  • px
  • vw
To make a box 10% of the viewport width, you should use the 'vw' (viewport width) unit. The 'vw' unit is based on the width of the viewport, making it ideal for responsive design. It ensures the box is always a percentage of the viewport's width, regardless of the screen size.

How does SMACSS (Scalable and Modular Architecture for CSS) categorize its styles?

  • By alphabetical order
  • By color
  • By position in the HTML
  • By specificity
SMACSS categorizes its styles by specificity. In SMACSS, styles are organized into five categories: Base, Layout, Module, State, and Theme. This categorization helps in creating a scalable and maintainable CSS architecture by defining how styles should be applied and structured.

For an element with position: sticky; to work, the parent container must have a defined ________.

  • Height
  • Margin
  • Overflow
  • Position
For an element with position: sticky; to work, the parent container must have a defined overflow property (e.g., overflow: auto;). This allows the element to stick within the scrolling container when it reaches a certain point, behaving as if it's "stuck" to the viewport.