MyBB Community Forums
Stylesheets can be with media parameter ? - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: Community Archive (https://community.mybb.com/forum-106.html)
+--- Forum: Archived Forums (https://community.mybb.com/forum-143.html)
+---- Forum: Archived Development and Support (https://community.mybb.com/forum-155.html)
+----- Forum: MyBB 1.6 (https://community.mybb.com/forum-138.html)
+------ Forum: 1.6 Suggestions and Feedback (https://community.mybb.com/forum-7.html)
+------ Thread: Stylesheets can be with media parameter ? (/thread-148685.html)



Stylesheets can be with media parameter ? - glover - 2013-12-06

Mybb Team would to add new function in style editor when we adding new stylesheet ?
I mean about function ($stylesheets) in global.php

Like this:
$stylesheets .= "<link type=\"text/css\" rel=\"stylesheet\" href=\"{$mybb->settings['bburl']}/{$page_stylesheet}\" />\n";
I manually added some media in stylesheet.
$stylesheets .= "<link type=\"text/css\" media=\"screen\" rel=\"stylesheet\" href=\"{$mybb->settings['bburl']}/{$page_stylesheet}\" />\n";
It would be better if we adding new stylesheet with a some parameters.
This can help for multiple stylesheets for several screen resolution. Like mobile, or monitor and printer.


RE: Stylesheets can be with media parameter ? - StefanT - 2013-12-06

You can use @media screen {...} in the stylesheets instead.


RE: Stylesheets can be with media parameter ? - glover - 2013-12-07

Hmmm Yea...
So media="screen" { in example.css is same as in <link type="text/css" media="screen" rel="stylesheet" href="xxx" /> ?


RE: Stylesheets can be with media parameter ? - glover - 2013-12-30

But all stylesheets will be loaded...

<link href="iphone4.css" rel="stylesheet" media="only screen and (-webkit-min-device-pixel-ratio: 2)" type="text/css" />
and

1
<link href="portrait.css" rel="stylesheet" media="all and (orientation:portrait)" />
 

1
<link href="landscape.css" rel="stylesheet" media="all and (orientation:landscape)" />
That would be better Smile