Welcome to the Treehouse Community
Looking to learn something new?
importing style sheet
why do we need to import stylesheet when we already have a style sheet from a css file.
and also if we are importing a style sheet can we do it in 2 ways like:
from the head tag using a style tags, and from writing @import "mystyle.css"; writing on top of the css rules in the css file.
Gabriel Pierce-Lackey11,014 Points
I'll be honest. I have never seen @import in any actual files/pages. I believe it's kind of new and not used too terribly often. i can see it being used for quickly importing styles that are universal for your website like for say a header or footer or nav bars, things like that without muddling up the css for the specific page you are making, so things are easier to read. Easier to change.. And yes that is correct you can do it in those two ways.
David KoenFront End Web Development Techdegree Student 8,449 Points
Importing multiple CSS stylesheets into a single stylesheet will save the time in having to link multiple stylesheets into a HTML doc. Rather just link the doc to the CSS stylesheet containing the imported stylesheets.