How to specify a specific css file in METEOR

北慕城南 提交于 2020-01-15 09:09:26

问题


Meteor gathers up all the css into a single file and doesn't allow for a css to be specified for print media.

I would like to be able to specific a css file that should not be include in the bundle up of css AND I would like to include :

<link rel="stylesheet" href="print-only.css" type="text/css" media="print" />

In the meteor page.


回答1:


you can declare CSS media types inside a CSS file. You don't need several different files for that.

For example, from http://www.w3schools.com/css/css_mediatypes.asp:

@media screen {
    p {
        font-family: verdana, sans-serif;
        font-size: 17px;
    }
}

@media print {
    p {
        font-family: georgia, serif;
        font-size: 14px;
        color: blue;
    }
}


来源:https://stackoverflow.com/questions/31281354/how-to-specify-a-specific-css-file-in-meteor

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!