In SASS, what is the difference between a mixin and a function?

  • Functions return a single computed value, and they can be used in expressions.
  • Mixins are blocks of reusable style declarations, and they don't return values.
  • Mixins can accept parameters and include style rules, while functions perform computations and return a value.
  • Mixins can only be used with @include, whereas functions are invoked with @function.
In SASS, mixins and functions serve different purposes. Mixins are used for reusable blocks of styles, often with parameters, while functions are designed to perform computations and return a single value. The key distinction lies in their usage and the nature of what they return. Understanding this helps in writing more modular and maintainable SASS code.

In CSS, which property would you use to remove the default list-style in an ordered or unordered list?

  • list-remove
  • list-reset
  • list-style
  • list-none
The correct option is list-none. This property is used to remove the default list-style (like bullets or numbers) from an ordered or unordered list. It helps in customizing the list appearance according to the design requirements.

When creating a bouncing ball animation in CSS, which properties are crucial to create the vertical movement and squash-and-stretch effect?

  • animation, keyframes, translate
  • bounce, stretch, vertical-motion
  • transform, translateY, scaleY
  • transition, scale, rotate
To create a bouncing ball animation with vertical movement and squash-and-stretch effect, the crucial properties are transform, translateY, and scaleY. These properties control the position and appearance of the ball during the animation.

To rotate an element 45 degrees using CSS, the transform: rotate(________); property is used.

  • 45deg
  • 90deg
  • 180deg
  • 360deg
The correct syntax for rotating an element 45 degrees in CSS is transform: rotate(45deg);. This CSS property is widely used for transforming elements, providing various transformation options like rotation, scaling, and skewing.

What is the main purpose of using font icons in web development?

  • Displaying scalable and resolution-independent icons using icon fonts.
  • Enhancing the accessibility of web content for users with disabilities.
  • Improving the semantic structure of HTML documents.
  • Reducing the reliance on external font resources for text rendering.
Font icons are scalable and resolution-independent, making them a versatile choice for displaying icons on a website. By using icon fonts, developers can easily customize the size, color, and style of icons using CSS, providing a flexible and efficient solution for web development. This approach also reduces the need for multiple image files, contributing to faster page loading times.

The CSS pseudo-class :________ is particularly useful for improving accessibility for users who navigate primarily via keyboard.

  • hover
  • focus
  • active
  • target
The correct option is focus. The :focus pseudo-class is used to apply styles when an element is in focus, making it crucial for improving accessibility for keyboard navigation.

To evenly distribute space around flex items, the property justify-content should be set to ________.

  • space-evenly
  • space-around
  • space-between
  • center
The correct option is space-around. This value evenly distributes the space around flex items, placing an equal amount of space on each side of each item. space-evenly would also work, but it includes space at the edges, which might not be desired in all cases. space-between would leave no space at the edges. center is not a valid option for justify-content.

Describe how CSS custom properties (CSS Variables) can be used to streamline the management of color schemes in a stylesheet.

  • CSS Variables cannot be used for managing color schemes.
  • They allow you to define a color only once and reuse it throughout the stylesheet.
  • They are limited to specific elements and cannot be reused.
  • They are only applicable to text color, not background color.
CSS custom properties enable the definition of variables for colors, making it easy to maintain a consistent color scheme by changing the variable value.

Which CSS position value is NOT relative to the normal document flow?

  • absolute
  • fixed
  • relative
  • static
In CSS, the 'static' position value is the default and is not positioned relative to the normal flow.

What is the purpose of the CSS border-style property?

  • Controls the spacing between elements
  • Defines the style of the border
  • Sets the width of the border
  • Specifies the color of the border
The border-style property in CSS is used to define the style of the border of an element. It can take values like solid, dotted, dashed, etc., to determine the appearance of the border.