Which CSS property is typically used to set breakpoints in responsive design?

  • @media
  • breakpoint
  • media
  • query
In responsive web design, the @media rule is used to set breakpoints. It allows you to define specific CSS styles that apply when certain conditions are met, such as screen width or orientation. By using @media queries, you can create responsive layouts that adjust to different screen sizes, making your website look and function well on various devices.

An element with display: none; differs from visibility: hidden; because the former ________.

  • Flips the element upside down
  • Hides the element but reserves its space
  • Makes the element transparent
  • Removes the element from the layout
An element with display: none; removes the element from the layout entirely. It doesn't occupy any space, and other elements act as if it's not there. In contrast, visibility: hidden; hides the element but still reserves its space in the layout.

What is the primary function of Autoprefixing in CSS development?

  • Adding vendor prefixes to CSS properties
  • Automatically adjusting font sizes
  • Generating responsive images
  • Minifying CSS code
Autoprefixing in CSS development is primarily used to automatically add vendor prefixes to CSS properties. These prefixes are necessary to ensure cross-browser compatibility. When you use CSS properties like "flex" or "grid," different browsers may require different prefixes (e.g., -webkit-, -moz-, -ms-) to render these properties correctly. Autoprefixing tools simplify this process, making your CSS code work consistently across various browsers.

What does the flex-wrap property control in a flex container?

  • It controls the alignment of flex items within the container.
  • It defines the direction in which flex items stack within the container.
  • It determines how flex items wrap when they exceed the container's width.
  • It specifies the amount of space between flex items.
The flex-wrap property in a flex container controls how flex items wrap when they exceed the container's width. It can be set to nowrap to prevent wrapping, wrap to allow wrapping in a single line, or wrap-reverse to wrap in the opposite direction.

In responsive design, what does the term "mobile-first" approach mean?

  • It means designing exclusively for tablets and excluding other device types.
  • It means designing only for mobile devices and ignoring desktop users.
  • It means designing primarily for desktop users and adapting the design for mobile devices later.
  • It means starting the design process with the mobile layout and progressively enhancing it for larger screens.
The "mobile-first" approach in responsive design involves starting the design process with a focus on mobile devices. This approach emphasizes designing for small screens first and then progressively enhancing the design for larger screens, such as tablets and desktops. It ensures that the design works well on mobile devices and then adapts gracefully to larger screens, providing a better user experience across different devices.

How does the "line-height" property affect the vertical spacing of a block of text?

  • It defines the space between two blocks of text
  • It determines the height of each line of text
  • It has no impact on the vertical spacing of text
  • It sets the space between characters within a line
The "line-height" property in CSS specifies the vertical space between lines of text within a block. A larger line-height value increases the vertical spacing, making text more readable, while a smaller value reduces the spacing. It is crucial for controlling text layout and readability.

If you want list items to display horizontally rather than vertically, the CSS property to adjust is ________.

  • display: block;
  • display: inline;
  • float: left;
  • text-align: center;
To make list items display horizontally (side by side) instead of vertically (stacked), you should adjust the CSS property "float: left." This property is used to float elements next to each other.

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'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.

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.

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.

How can you create a function in SASS that returns a value?

  • Using the @function directive
  • Using the @mixin directive
  • Using the @return keyword
  • Using the @value keyword
To create a function in SASS that returns a value, you use the @function directive and the @return keyword within the function block. This allows you to define reusable pieces of logic that can compute and return values. Functions are typically used for calculations and value generation in SASS.