Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the purpose of onTablet and onDesktop html attributes

Bootstrap 2 metro theme uses onTablet and onDesktop html attributes like in

https://github.com/jiji262/Bootstrap_Metro_Dashboard/blob/master/index.html#L386

<div class="span3 statbox purple" onTablet="span6" onDesktop="span3">

I converted this theme to Bootstrap 3 using online auto converter. Those attributes are not changed and appear now as

            <div class="col-md-3 statbox purple" ontablet="col-md-6" ondesktop="col-md-3">

I searched html specs and this metro theme source code but havent found any references to those.

Why those attributes are used and is it safe to remove them ?

like image 512
Andrus Avatar asked Nov 09 '22 11:11

Andrus


1 Answers

From http://pydoc.net/ I found these attributes being used as Bools for display of the twitter bootstrap nav-bar component.

 """ Create a twitter bootstrap responsive nav-bar component

**Key Arguments:**
    - ``shade`` -- if dark then colors are inverted [ False | 'dark' ]
    - ``brand`` -- the website brand [ image | text ]
    - ``outsideNavList`` -- nav-list to be contained outside collapsible content
    - ``insideNavList`` -- nav-list to be contained inside collapsible content
    - ``htmlId`` --
    - ``onPhone`` -- does this container get displayed on a phone sized screen
    - ``onTablet`` -- does this container get displayed on a tablet sized screen
    - ``onDesktop`` -- does this container get displayed on a desktop sized screen

**Return:**
    - ``navBar`` -- """

They are used for describing how to display the tag on different devices. It is probably safe to remove them if you want your tag to be displayed the same no matter the device.

But if they are used in the .js they should remain so as not to damage JavaScript functionality.

like image 165
Joe Lloyd Avatar answered Nov 15 '22 05:11

Joe Lloyd