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.

You need to remove the default bullet points and apply a custom image as the bullet for each list item in an unordered list. How would you achieve this in CSS?

  • Apply a background image to each list item.
  • Use the list-style-image property.
  • Use the list-style-type property with the image value.
  • Use the list-style: none; property.
To remove the default bullet points and apply a custom image as the bullet for list items in an unordered list, you should use the list-style-image property and specify the URL of the image you want to use as the bullet.

An element with float: right; will move to the ________ of its containing element.

  • Bottom
  • Left
  • Right
  • Top
An element with float: right; will move to the right of its containing element. This property is often used for creating layouts where elements are floated to the right or left, allowing text and other content to flow around them.

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.

When you want flex items to stack vertically, you set flex-direction to ________.

  • Column
  • Column-reverse
  • Row
  • Row-reverse
To make flex items stack vertically in a Flexbox container, you set flex-direction to column. This means the items will be arranged one below the other, creating a vertical stack.