{"id":26680,"date":"2013-12-10T23:05:31","date_gmt":"2013-12-10T23:05:31","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/browsers\/"},"modified":"2016-01-17T12:07:28","modified_gmt":"2016-01-17T12:07:28","slug":"browsers","status":"publish","type":"plugin","link":"https:\/\/tah.wordpress.org\/plugins\/browsers\/","author":7532169,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"0.4.7","stable_tag":"0.4.7","tested":"4.4.34","requires":"3.2","requires_php":"","requires_plugins":"","header_name":"Conditional Stylesheets and Body Classes","header_author":"Q Studio","header_description":"","assets_banners_color":"","last_updated":"2016-01-17 12:07:28","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"http:\/\/qstudio.us\/plugins\/","header_author_uri":"https:\/\/qstudio.us\/","rating":5,"author_block_rating":0,"active_installs":30,"downloads":3723,"num_ratings":2,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":[],"upgrade_notice":{"0.2":"<p>First release.<\/p>"},"ratings":{"1":0,"2":0,"3":0,"4":0,"5":"2"},"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["0.2","0.3","0.3.1","0.3.2","0.3.3","0.3.4","0.4","0.4.1","0.4.2","0.4.3","0.4.4","0.4.5","0.4.6","0.4.7"],"block_files":[],"assets_screenshots":[],"screenshots":[],"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[7645,1151,4060,356,1776],"plugin_category":[59],"plugin_contributors":[79038],"plugin_business_model":[],"class_list":["post-26680","plugin","type-plugin","status-publish","hentry","plugin_tags-browsers","plugin_tags-clients","plugin_tags-conditional","plugin_tags-css","plugin_tags-stylesheets","plugin_category-utilities-and-tools","plugin_contributors-qlstudio","plugin_committers-qlstudio"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/browsers.svg","icon_2x":false,"generated":true},"screenshots":[],"raw_content":"<!--section=description-->\n<p>Easily include browser specific stylesheets in templates or select browser and version specific classes in CSS.<\/p>\n\n<p>Conditional browser stylesheets are added after the main theme style.css allowing them to overrule previous rules - you only need to add the CSS rules that should change.<\/p>\n\n<p>This plugin uses up-to-date WordPress top level functions, sanitizes all input data and is fully internationalized.<\/p>\n\n<p>For feature request and bug reports, <a href=\"https:\/\/qstudio.us\/support\/categories\/conditional-stylesheets-and-body-classes\">please use the Q Support Website<\/a>.<\/p>\n\n<p>Please do not use the Wordpress.org forum to report bugs, as we no longer monitor or respond to questions there.<\/p>\n\n<h4>Features<\/h4>\n\n<ul>\n<li>Checks for and adds browser and version specific stylesheets - such as \"browsers-windows-firefox.css\".<\/li>\n<li>Add browser and version specific body classes to all pages - such as body.browsers-msie-10<\/li>\n<li>Includes the Mobile Detect class and adds mobile &amp; touch body classes.<\/li>\n<li>Adds a post type body class, for example: \"posttype-page\".<\/li>\n<li>Inserts handy HTML comments in the HTML footer of template files to tell you which CSS files could be used and which were found.<\/li>\n<\/ul>\n\n<!--section=installation-->\n<p>For an automatic installation through WordPress:<\/p>\n\n<ol>\n<li>Go to the 'Add New' plugins screen in your WordPress admin area<\/li>\n<li>Search for 'Browsers'<\/li>\n<li>Click 'Install Now' and activate the plugin<\/li>\n<\/ol>\n\n<p>For a manual installation via FTP:<\/p>\n\n<ol>\n<li>Upload the <code>browsers<\/code> directory to the <code>\/wp-content\/plugins\/<\/code> directory<\/li>\n<li>Activate the plugin through the 'Plugins' screen in your WordPress admin area<\/li>\n<\/ol>\n\n<p>To upload the plugin through WordPress, instead of FTP:<\/p>\n\n<ol>\n<li>Upload the downloaded zip file on the 'Add New' plugins screen (see the 'Upload' tab) in your WordPress admin area and activate.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt>How do I add and access browser specirfic stylesheets?<\/dt>\n<dd><p>To add extra stylesheets, create a new CSS file and upload it to the root of your active theme or in the directory THEME\/library\/css\/ - you can include a mixture of 3 values:<\/p>\n\n<ul>\n<li>Operating System name ( windows, mac, linux )<\/li>\n<li>Browser Name ( firefox, safari, chrome, msie )<\/li>\n<li>Browser Version ( a specific whole version number )<\/li>\n<\/ul>\n\n<p>The plugin then looks for a matching CSS file in the root of the active theme or in the directory THEME\/library\/css\/ using a combinations of these 3 values ( in these example we'll use IE 10 on windows ):<\/p>\n\n<ul>\n<li>browsers-msie.css<\/li>\n<li>browsers-msie-10.css<\/li>\n<li>browsers-windows-msie.css<\/li>\n<\/ul><\/dd>\n<dt>How do I select browser specific classes in my CSS files?<\/dt>\n<dd><p>The Browsers plugin adds a collection of extra browser and operating system specific classes to the HTML &lt;body&gt; tag of all front-end pages of the current active theme.<\/p>\n\n<p>The best way to find out what classes are added is to use a source code inspector like Google Chrome's Inspector to view the &lt;body&gt; tag.<\/p>\n\n<p>You can then use these new classes to select HTML elements in the following way ( again using IE 10 as an example ):<\/p>\n\n<p>~~ style.css ~~<\/p>\n\n<p>body.browsers-msie-10 {\n    background-color: red;\n}<\/p>\n\n<p>~~~~~~~~~~~~<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>0.4.7<\/h4>\n\n<ul>\n<li>readme update<\/li>\n<\/ul>\n\n<h4>0.4.6<\/h4>\n\n<ul>\n<li>WP 4.4.1 Testing<\/li>\n<\/ul>\n\n<h4>0.4.5<\/h4>\n\n<ul>\n<li>WP 4.0 Testing<\/li>\n<\/ul>\n\n<h4>0.4.4<\/h4>\n\n<ul>\n<li>3.9.1 Testing<\/li>\n<\/ul>\n\n<h4>0.4.3<\/h4>\n\n<ul>\n<li>3.8.1 Testing<\/li>\n<li>Forum link<\/li>\n<\/ul>\n\n<h4>0.4.1<\/h4>\n\n<ul>\n<li>Name change<\/li>\n<\/ul>\n\n<h4>0.4.0<\/h4>\n\n<ul>\n<li>Readyness for Q Theme Framework integration<\/li>\n<\/ul>\n\n<h4>0.3.4<\/h4>\n\n<ul>\n<li>Readme corrections<\/li>\n<\/ul>\n\n<h4>0.3.1<\/h4>\n\n<ul>\n<li>Correction to stylesheet location function<\/li>\n<\/ul>\n\n<h4>0.3<\/h4>\n\n<ul>\n<li>Body tags and CSS file names homogenized<\/li>\n<\/ul>\n\n<h4>0.2<\/h4>\n\n<ul>\n<li>First public release.<\/li>\n<\/ul>","raw_excerpt":"Add conditional browser stylesheets and body class declarations","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/tah.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/26680","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tah.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/tah.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/tah.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=26680"}],"author":[{"embeddable":true,"href":"https:\/\/tah.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/qlstudio"}],"wp:attachment":[{"href":"https:\/\/tah.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=26680"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/tah.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=26680"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/tah.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=26680"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/tah.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=26680"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/tah.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=26680"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/tah.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=26680"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}