CSS Houdini's ________ API allows developers to define custom CSS properties that can be used in standard CSS files.

  • Custom
  • Layout
  • Paint
  • Properties and Values
CSS Houdini's Properties and Values API enables developers to define custom CSS properties, providing more control and extensibility to styles in standard CSS files.

In CSS Flexbox, which property is used on the container to align items horizontally?

  • justify-content
  • align-items
  • flex-align
  • flex-container
The correct option is justify-content. This property is used to align items along the main axis (horizontally in a row layout) in a flex container.

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.

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.

Media queries are typically written using the @________ rule in CSS.

  • import
  • media
  • query
  • screen
Media queries in CSS are written using the @media rule. This rule is used to apply different styles for different devices and conditions, allowing for responsive design.

How would you create a transparent border that doesn't affect the layout dimensions of a box?

  • border: 1px solid transparent;
  • border: 1px transparent solid;
  • border: transparent 1px solid;
  • transparent: border 1px solid;
To create a transparent border that doesn't affect the layout dimensions, you can use the border property with a transparent color value. This ensures that the border is there visually but does not take up any additional space in the layout.

What distinguishes CSS Houdini's Animation Worklet from traditional CSS animations?

  • Animation Worklet only supports basic transition animations.
  • Animation Worklet provides a JavaScript API to create complex animations outside the main thread.
  • Traditional CSS animations are limited to predefined easing functions.
  • Traditional CSS animations are more performant and have better browser compatibility.
CSS Houdini's Animation Worklet introduces a JavaScript API that enables the creation of complex animations outside the main thread, offering greater control and performance compared to traditional CSS animations.

You're designing a web application that requires certain elements to be draggable within the confines of a specific area. Which combination of positioning and other CSS properties will you need to consider?

  • position: absolute, top: 0, left: 0; z-index: 1;
  • position: fixed; width: 100%; height: 100%;
  • position: relative; overflow: hidden;
  • position: sticky, bottom: 0, right: 0;
To create draggable elements within a specific area, you should use position: relative on the container and set overflow: hidden. This allows the absolute-positioned elements to be confined within the container.

When using position: sticky;, which two properties must be set for the sticky behavior to work effectively?

  • top
  • left
  • position
  • display
The correct options for the position: sticky; to work effectively are position: sticky; and top. The position property must be set to sticky, and the top property should be defined to specify the position where the element becomes sticky.

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.

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.

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.