]> Import vs Link | Web Developer Reference Blog

Import vs Link

Import is where you import a .css file from inside another css declaration in the header of a html document or in another style-sheet. The main advantage is that older browsers ignore these and will not fall over because of styles they don’t understand.

You can have an import within a link or an import but not within a link. Using imports correctly you can ‘override’ styles to fix flaws of the rendering in older browsers which would cause a design fault in a newer browser.

e.g.

//STYLES HERE TO FIX FLAWS IN THE WAY OLDER BROSWERS RENDER WEBSITE
@import "newerbrowser.css";//IMPORT TO OVERRIDE THEM

Tags: @import Hack

Leave a Reply