Organizing Sass files by components groups related styles, making it easier to find, update, and reuse them. This improves maintainability and clarity.
_button.scss inside a components folder, which import statement correctly includes it in main.scss?/* main.scss */ @import ???;
When importing Sass partials, you omit the underscore and file extension. So @import 'components/button'; correctly imports _button.scss inside the components folder.
_card.scss component with styles for .card and a global style for .card in main.scss, which style will apply if both set background-color?/* _card.scss */ .card { background-color: blue; } /* main.scss */ .card { background-color: red; }
When selectors have the same specificity, the one declared last in the compiled CSS applies. Since main.scss is compiled after _card.scss, its .card background-color overrides the earlier one.
_navbar.scss component that lays out navigation links horizontally with space between them. Which Sass code snippet correctly uses Flexbox for this?justify-content and align-items for layout alignment.Flexbox requires display: flex; and uses justify-content to space items horizontally and align-items to align them vertically. Option C correctly applies these.
_button.scss component. Which Sass snippet best ensures visible focus outlines for keyboard users without affecting mouse users?The :focus-visible pseudo-class applies styles only when the element is focused via keyboard, not mouse. This improves accessibility by showing outlines only when needed.