MyBB Community Forums

Full Version: Stylesheets can be with media parameter ?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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.
You can use @media screen {...} in the stylesheets instead.
Hmmm Yea...
So media="screen" { in example.css is same as in <link type="text/css" media="screen" rel="stylesheet" href="xxx" /> ?
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" />

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

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