0
0
SASSmarkup~5 mins

Vendor prefix mixin patterns in SASS - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is a vendor prefix in CSS?
A vendor prefix is a special code added before CSS properties to ensure they work in specific browsers. Examples include -webkit- for Chrome and Safari, -moz- for Firefox, and -ms- for Internet Explorer.
Click to reveal answer
beginner
Why use mixins for vendor prefixes in Sass?
Mixins let you write vendor prefixes once and reuse them everywhere. This saves time, avoids mistakes, and keeps your code clean and easy to update.
Click to reveal answer
beginner
Example of a simple vendor prefix mixin for border-radius in Sass?
@mixin border-radius($radius) { -webkit-border-radius: $radius; -moz-border-radius: $radius; border-radius: $radius; }
Click to reveal answer
intermediate
How do vendor prefix mixins improve maintainability?
If browser support changes, you only update the mixin once. All styles using that mixin update automatically, making your project easier to maintain.
Click to reveal answer
intermediate
What is a common pattern to handle multiple vendor prefixes in one mixin?
Use a mixin that sets all needed prefixes plus the standard property. Pass the value as a parameter to keep it flexible and reusable.
Click to reveal answer
What does the -webkit- prefix target?
AChrome and Safari browsers
BFirefox browser
CInternet Explorer
DAll browsers
Why use a mixin for vendor prefixes in Sass?
ATo write prefixes once and reuse them
BTo make CSS slower
CTo avoid using variables
DTo remove prefixes automatically
Which of these is NOT a vendor prefix?
A-moz-
B-html-
C-ms-
D-webkit-
What is the main benefit of updating a vendor prefix mixin?
AIt slows down the browser
BIt deletes old CSS files
CAll styles using it update automatically
DIt changes HTML structure
How do you pass values to a vendor prefix mixin?
ABy adding inline styles
BBy editing the CSS file directly
CUsing JavaScript
DAs parameters to the mixin
Explain what vendor prefix mixins are and why they are useful in Sass.
Think about how writing prefixes once helps many places.
You got /3 concepts.
    Describe how you would write a mixin to handle vendor prefixes for a CSS property.
    Start with @mixin and include all prefixes inside.
    You got /3 concepts.