What is SASS?
Sass is a CSS preprocessor that adds functionality to CSS, such as variables, nesting, and more. It allows us to write more efficient code and simplifies task like browser compatibility.
Practice mode
Generate a random set of questions, reveal answers as you go and score yourself honestly.
Sass is a CSS preprocessor that adds functionality to CSS, such as variables, nesting, and more. It allows us to write more efficient code and simplifies task like browser compatibility.
Specificity in CSS is a way of determining which CSS rule applies to an element. It is based on the number of selectors and their types in a CSS rule. Specificity is calculated using a formula: inline styles have the highest specificity, followed by IDs, classes, and then elements.
The <picture> element in HTML5 is used to provide multiple versions of an image at different resolutions or sizes, and allows the browser to choose the best version to display based on the user's device and viewport size.
A CSS preprocessor is a tooling program that extends standard CSS syntax with programmatic capabilities (such as variables, functions, mixins, and nested rules), compiling the code into standard, browser-compatible CSS before runtime:
### Popular Preprocessors:
### Key Preprocessor Features:
_variables.scss, _buttons.scss) and importing via @use.@scope, color functions) have adopted ideas originally introduced by preprocessors.The line-height property defines the height of an inline line box, determining the vertical distance between baselines of consecutive lines of text:
### Value Formats:
body { line-height: 1.5; }
A unitless number acts as a proportional multiplier of the element's current font-size. Child elements inherit the multiplier rather than a fixed computed pixel size, preventing text overlapping if children declare larger font sizes.
px, rem): line-height: 24px; (Rigid, breaks on dynamic font scaling).150%): Can cause inheritance calculation issues in nested headers.The box model in CSS is a way of representing elements as boxes with content, padding, borders, and margins. The content area is the actual content of the element, the padding is the space between the content and the border, the border is a line around the element, and the margin is the space between the border and the surrounding elements.
To make images responsive in CSS, you can use the max-width: 100% property, which will make the image scale down proportionally to fit the width of its container while maintaining its aspect ratio.
The :checked pseudo-class is used to target form elements that have been selected by the user, such as checkboxes or radio buttons. This can be used to change the appearance or behavior of the selected element.
HTML entities are codes used to represent special characters in HTML that cannot be easily typed or displayed. Example: & represents (&)
The properties of CSS 3D Transforms are: