There can be only one css stylesheet per media

less than 1 minute read

I thought it was a good idea to specify a media in my stylesheet link :

<link rel="stylesheet" href="/stylesheets/tags.css" type="text/css" name="tags stylesheet" media="screen" />

but when I tried to add another stylesheet, it was ignored !


<link rel="stylesheet" href="/stylesheets/common.css" type="text/css" name="main stylesheet" media="screen" />
<link rel="stylesheet" href="/stylesheets/tags.css" type="text/css" name="tags stylesheet" media="screen" />

It worked by removing the media attribute. It seems that only one stylesheet per media is taken into account.

I usually write about 15 minutes worth of reading per month. I won't transfer your email. No Spam, unsubscribe whenever you want.

As a gift for subscribing, you'll receive an illustrated mini-ebook "How to start a team coding dojo"!

Categories:

Updated:

Leave a comment