{"id":18,"date":"2023-08-25T17:34:39","date_gmt":"2023-08-25T17:34:39","guid":{"rendered":"\/\/api.jquerymobile.com\/1.4\/?p=18"},"modified":"2023-08-25T17:34:39","modified_gmt":"2023-08-25T17:34:39","slug":"classes","status":"publish","type":"post","link":"https:\/\/api.jquerymobile.com\/1.4\/classes\/","title":{"rendered":"Classes"},"content":{"rendered":"<article id=\"classes1\" class=\"entry \"><h2 class=\"section-title\"><span>Classes<\/span><\/h2>\n<div class=\"entry-wrapper\">\n<p class=\"desc\"><strong>Description: <\/strong>CSS classes for common styles<\/p>\n<div class=\"longdesc\" id=\"entry-longdesc\">\n\t\t<h2>Style Classes<\/h2>\n\t\t<p>jQuery Mobile uses the following style classes:<\/p>\n\t\t<table>\n\t\t\t<tr>\n\t\t\t\t<td class=\"enum-value\"><div style=\"white-space: nowrap;\">ui-corner-all<\/div><\/td>\n\t\t\t\t<td>Adds rounded corners to the element.<\/td>\n\t\t\t<\/tr>\n\t\t\t<tr>\n\t\t\t\t<td class=\"enum-value\"><div style=\"white-space: nowrap;\">ui-shadow<\/div><\/td>\n\t\t\t\t<td>Adds an item shadow around the element.<\/td>\n\t\t\t<\/tr>\n\t\t\t<tr>\n\t\t\t\t<td class=\"enum-value\"><div style=\"white-space: nowrap;\">ui-overlay-shadow<\/div><\/td>\n\t\t\t\t<td>Adds an overlay shadow around the element. The intended effect is for the element to appear to float above other elements.<\/td>\n\t\t\t<\/tr>\n\t\t\t<tr>\n\t\t\t\t<td class=\"enum-value\"><div style=\"white-space: nowrap;\">ui-mini<\/div><\/td>\n\t\t\t\t<td>Reduces the font size and scales down paddings proportionally to produce a miniature version of the element for use in toolbars and tight spaces.<\/td>\n\t\t\t<\/tr>\n\t\t<\/table>\n\t\t<p>These classes can be applied any of the framework&apos;s widgets.<\/p>\n\t\t<h3>Widget-specific classes<\/h3>\n\t\t<table>\n\t\t\t<tr>\n\t\t\t\t<td class=\"enum-value\"><div style=\"white-space: nowrap;\">ui-collapsible-inset<\/div><\/td>\n\t\t\t\t<td>The <a href=\"\/1.4\/collapsible\/\">collapsible<\/a> widget has horizontal margins, borders, and rounded corners when this class is applied.<\/td>\n\t\t\t<\/tr>\n\t\t\t<tr>\n\t\t\t\t<td class=\"enum-value\"><div style=\"white-space: nowrap;\">ui-listview-inset<\/div><\/td>\n\t\t\t\t<td>The <a href=\"\/1.4\/listview\/\">listview<\/a> widget has horizontal margins, borders, and rounded corners when this class is applied.<\/td>\n\t\t\t<\/tr>\n\t\t<\/table>\n\t\t<h3>Button-specific classes<\/h3>\n\t\t<p>In addition to the style classes, you can add the following classes to <code>a<\/code> (anchor) and <code>button<\/code> elements to render them touch-friendly:<\/p>\n\t\t<table>\n\t\t\t<tr><th colspan=\"2\">Basic options<\/th><\/tr>\n\t\t\t<tr>\n\t\t\t\t<td class=\"enum-value\"><div style=\"white-space: nowrap;\">ui-btn<\/div><\/td>\n\t\t\t\t<td>You must add this class to indicate that the element is to be styled as a button. This is a prerequisite for adding any other button-related classes.<\/td>\n\t\t\t<\/tr>\n\t\t\t<tr>\n\t\t\t\t<td class=\"enum-value\"><div style=\"white-space: nowrap;\">ui-btn-inline<\/div><\/td>\n\t\t\t\t<td>Displays the button inline. This means that it will only consume as much space as is needed for the label. This allows you to place buttons side by side, flowing with the text.<\/td>\n\t\t\t<\/tr>\n\t\t\t<tr>\n\t\t\t\t<td class=\"enum-value\"><div style=\"white-space: nowrap;\">ui-shadow-icon<\/div><\/td>\n\t\t\t\t<td>Draws a shadow around the icon.<\/td>\n\t\t\t<\/tr>\n\t\t\t<tr><th colspan=\"2\">Icon positioning<\/th><\/tr>\n\t\t\t<tr>\n\t\t\t\t<td class=\"enum-value\"><div style=\"white-space: nowrap;\">ui-btn-icon-top<\/div><\/td>\n\t\t\t\t<td>The icon appears above the text<\/td>\n\t\t\t<\/tr>\n\t\t\t<tr>\n\t\t\t\t<td class=\"enum-value\"><div style=\"white-space: nowrap;\">ui-btn-icon-right<\/div><\/td>\n\t\t\t\t<td>The icon appears to the right of the text<\/td>\n\t\t\t<\/tr>\n\t\t\t<tr>\n\t\t\t\t<td class=\"enum-value\"><div style=\"white-space: nowrap;\">ui-btn-icon-bottom<\/div><\/td>\n\t\t\t\t<td>The icon appears below the text<\/td>\n\t\t\t<\/tr>\n\t\t\t<tr>\n\t\t\t\t<td class=\"enum-value\"><div style=\"white-space: nowrap;\">ui-btn-icon-left<\/div><\/td>\n\t\t\t\t<td>The icon appears to the left of the text<\/td>\n\t\t\t<\/tr>\n\t\t\t<tr>\n\t\t\t\t<td class=\"enum-value\"><div style=\"white-space: nowrap;\">ui-btn-icon-notext<\/div><\/td>\n\t\t\t\t<td>The button text is suppressed, and only the icon is shown. The result is a circular button the size of the icon.<\/td>\n\t\t\t<\/tr>\n\t\t\t<tr><th colspan=\"2\">Theme<\/th><\/tr>\n\t\t\t<tr>\n\t\t\t\t<td class=\"enum-value\"><div style=\"white-space: nowrap;\">ui-btn-[a-z]<\/div><\/td>\n\t\t\t\t<td>Sets the color scheme (swatch) for the button. Use a single letter from a-z that maps to the swatches included in your theme. For example: <code>ui-btn-b<\/code>\n<\/td>\n\t\t\t<\/tr>\n\t\t<\/table>\n\t\t<h3 id=\"icon-classes\">Icon classes<\/h3>\n\t\t<p><a href=\"\/1.4\/icons\/\">Icons<\/a> are used by a variety of widgets. The table below lists all the available icon classes. The widgets which support an icon usually have an option named &quot;icon&quot;. The value for that option is the name of the icon, which is appended to the prefix <code>ui-icon-<\/code> to create the icon class name. In the class list below, the icon names are emphasized as part of the icon class name.<\/p>\n\t\t<table>\n\t\t\t<tr>\n\t\t\t\t<td class=\"enum-value\"><div style=\"white-space: nowrap;\">ui-icon-<strong>alert<\/strong>\n<\/div><\/td>\n\t\t\t\t<td>An exclamation mark inside a triangle.<\/td>\n\t\t\t<\/tr>\n\t\t\t<tr>\n\t\t\t\t<td class=\"enum-value\"><div style=\"white-space: nowrap;\">ui-icon-<strong>arrow-l<\/strong>\n<\/div><\/td>\n\t\t\t\t<td>An arrow pointing left (&#x2190;).<\/td>\n\t\t\t<\/tr>\n\t\t\t<tr>\n\t\t\t\t<td class=\"enum-value\"><div style=\"white-space: nowrap;\">ui-icon-<strong>arrow-r<\/strong>\n<\/div><\/td>\n\t\t\t\t<td>An arrow pointing right (&#x2192;).<\/td>\n\t\t\t<\/tr>\n\t\t\t<tr>\n\t\t\t\t<td class=\"enum-value\"><div style=\"white-space: nowrap;\">ui-icon-<strong>arrow-u<\/strong>\n<\/div><\/td>\n\t\t\t\t<td>An arrow pointing up (&#x2191;).<\/td>\n\t\t\t<\/tr>\n\t\t\t<tr>\n\t\t\t\t<td class=\"enum-value\"><div style=\"white-space: nowrap;\">ui-icon-<strong>arrow-d<\/strong>\n<\/div><\/td>\n\t\t\t\t<td>An arrow pointing down (&#x2193;).<\/td>\n\t\t\t<\/tr>\n\t\t\t<tr>\n\t\t\t\t<td class=\"enum-value\"><div style=\"white-space: nowrap;\">ui-icon-<strong>back<\/strong>\n<\/div><\/td>\n\t\t\t\t<td>A curved arrow arcing counterclockwise upwards.<\/td>\n\t\t\t<\/tr>\n\t\t\t<tr>\n\t\t\t\t<td class=\"enum-value\"><div style=\"white-space: nowrap;\">ui-icon-<strong>bars<\/strong>\n<\/div><\/td>\n\t\t\t\t<td>Three horizontal bars one above the other.<\/td>\n\t\t\t<\/tr>\n\t\t\t<tr>\n\t\t\t\t<td class=\"enum-value\"><div style=\"white-space: nowrap;\">ui-icon-<strong>carat-b<\/strong>\n<\/div><\/td>\n\t\t\t\t<td>A carat pointing down (v).<\/td>\n\t\t\t<\/tr>\n\t\t\t<tr>\n\t\t\t\t<td class=\"enum-value\"><div style=\"white-space: nowrap;\">ui-icon-<strong>carat-l<\/strong>\n<\/div><\/td>\n\t\t\t\t<td>A carat pointing left (&lt;).<\/td>\n\t\t\t<\/tr>\n\t\t\t<tr>\n\t\t\t\t<td class=\"enum-value\"><div style=\"white-space: nowrap;\">ui-icon-<strong>carat-r<\/strong>\n<\/div><\/td>\n\t\t\t\t<td>A carat pointing right (&gt;).<\/td>\n\t\t\t<\/tr>\n\t\t\t<tr>\n\t\t\t\t<td class=\"enum-value\"><div style=\"white-space: nowrap;\">ui-icon-<strong>carat-t<\/strong>\n<\/div><\/td>\n\t\t\t\t<td>A carat pointing up (^).<\/td>\n\t\t\t<\/tr>\n\t\t\t<tr>\n\t\t\t\t<td class=\"enum-value\"><div style=\"white-space: nowrap;\">ui-icon-<strong>check<\/strong>\n<\/div><\/td>\n\t\t\t\t<td>A checkmark (&#x2713;).<\/td>\n\t\t\t<\/tr>\n\t\t\t<tr>\n\t\t\t\t<td class=\"enum-value\"><div style=\"white-space: nowrap;\">ui-icon-<strong>delete<\/strong>\n<\/div><\/td>\n\t\t\t\t<td>A diagonal cross similar to (&#x2715;).<\/td>\n\t\t\t<\/tr>\n\t\t\t<tr>\n\t\t\t\t<td class=\"enum-value\"><div style=\"white-space: nowrap;\">ui-icon-<strong>edit<\/strong>\n<\/div><\/td>\n\t\t\t\t<td>A pencil - similar to (&#x270E;) but pointing to the lower left.<\/td>\n\t\t\t<\/tr>\n\t\t\t<tr>\n\t\t\t\t<td class=\"enum-value\"><div style=\"white-space: nowrap;\">ui-icon-<strong>forward<\/strong>\n<\/div><\/td>\n\t\t\t\t<td>A curved arrow arcing clockwise upwards.<\/td>\n\t\t\t<\/tr>\n\t\t\t<tr>\n\t\t\t\t<td class=\"enum-value\"><div style=\"white-space: nowrap;\">ui-icon-<strong>gear<\/strong>\n<\/div><\/td>\n\t\t\t\t<td>A gear (&#x2699;).<\/td>\n\t\t\t<\/tr>\n\t\t\t<tr>\n\t\t\t\t<td class=\"enum-value\"><div style=\"white-space: nowrap;\">ui-icon-<strong>grid<\/strong>\n<\/div><\/td>\n\t\t\t\t<td>A 3&#x2715;3 grid.<\/td>\n\t\t\t<\/tr>\n\t\t\t<tr>\n\t\t\t\t<td class=\"enum-value\"><div style=\"white-space: nowrap;\">ui-icon-<strong>home<\/strong>\n<\/div><\/td>\n\t\t\t\t<td>A house similar to (&#x2302;).<\/td>\n\t\t\t<\/tr>\n\t\t\t<tr>\n\t\t\t\t<td class=\"enum-value\"><div style=\"white-space: nowrap;\">ui-icon-<strong>minus<\/strong>\n<\/div><\/td>\n\t\t\t\t<td>A &quot;minus&quot; sign (-).<\/td>\n\t\t\t<\/tr>\n\t\t\t<tr>\n\t\t\t\t<td class=\"enum-value\"><div style=\"white-space: nowrap;\">ui-icon-<strong>plus<\/strong>\n<\/div><\/td>\n\t\t\t\t<td>A &quot;plus&quot; sign (+).<\/td>\n\t\t\t<\/tr>\n\t\t\t<tr>\n\t\t\t\t<td class=\"enum-value\"><div style=\"white-space: nowrap;\">ui-icon-<strong>refresh<\/strong>\n<\/div><\/td>\n\t\t\t\t<td>A circular arrow similar to (&#x27F3;).<\/td>\n\t\t\t<\/tr>\n\t\t\t<tr>\n\t\t\t\t<td class=\"enum-value\"><div style=\"white-space: nowrap;\">ui-icon-<strong>search<\/strong>\n<\/div><\/td>\n\t\t\t\t<td>A magnifying glass.<\/td>\n\t\t\t<\/tr>\n\t\t\t<tr>\n\t\t\t\t<td class=\"enum-value\"><div style=\"white-space: nowrap;\">ui-icon-<strong>star<\/strong>\n<\/div><\/td>\n\t\t\t\t<td>A star similar to (&#x272D;).<\/td>\n\t\t\t<\/tr>\n\t\t<\/table>\n\t\t<h3 id=\"theme-classes\">Theme-related classes<\/h3>\n\t\t<p>The class prefixes in the table below are used for applying a swatch to various parts of the user interface. The actual class name is constructed by appending the swatch letter (a-z) to the prefix. For example, the class <code>ui-body-<strong>a<\/strong><\/code> is the swatch applied to the page.<\/p>\n\t\t<table>\n\t\t\t<tr>\n\t\t\t\t<td class=\"enum-value\" id=\"theme-classes-ui-bar\"><div style=\"white-space: nowrap;\">ui-bar-[a-z]<\/div><\/td>\n\t\t\t\t<td>Sets the color scheme (swatch) for a bar. This includes headers and footers, or bars you include in the page.<\/td>\n\t\t\t<\/tr>\n\t\t\t<tr>\n\t\t\t\t<td class=\"enum-value\" id=\"theme-classes-ui-body\"><div style=\"white-space: nowrap;\">ui-body-[a-z]<\/div><\/td>\n\t\t\t\t<td>Sets the color scheme (swatch) for a content block. This includes page content panes (<span class=\"warning\">deprecated as of 1.4.0<\/span>), listview items, popups, collapsibles, the loader widget, sliders, and panels.<\/td>\n\t\t\t<\/tr>\n\t\t\t<tr>\n\t\t\t\t<td class=\"enum-value\" id=\"theme-classes-ui-btn\"><div style=\"white-space: nowrap;\">ui-btn-[a-z]<\/div><\/td>\n\t\t\t\t<td>Sets the color scheme (swatch) for a button.<\/td>\n\t\t\t<\/tr>\n\t\t\t<tr>\n\t\t\t\t<td class=\"enum-value\" id=\"theme-classes-ui-group-theme\"><div style=\"white-space: nowrap;\">ui-group-theme-[a-z]<\/div><\/td>\n\t\t\t\t<td>Sets the color scheme (swatch) for controlgroups, listviews, and collapsible sets (accordions).<\/td>\n\t\t\t<\/tr>\n\t\t\t<tr>\n\t\t\t\t<td class=\"enum-value\" id=\"theme-classes-ui-overlay\"><div style=\"white-space: nowrap;\">ui-overlay-[a-z]<\/div><\/td>\n\t\t\t\t<td>Sets the color scheme (swatch) for backgrounds such as those of popup widgets, and page containers.<\/td>\n\t\t\t<\/tr>\n\t\t\t<tr>\n\t\t\t\t<td class=\"enum-value\" id=\"theme-classes-ui-page-theme\"><div style=\"white-space: nowrap;\">ui-page-theme-[a-z]<\/div><\/td>\n\t\t\t\t<td>Sets the color scheme (swatch) for pages.<\/td>\n\t\t\t<\/tr>\n\t\t\t<tr>\n\t\t\t\t<td class=\"enum-value\" id=\"theme-classes-ui-panel-page-container\"><div style=\"white-space: nowrap;\">ui-panel-page-container-[a-z]<\/div><\/td>\n\t\t\t\t<td>Panels temporarily set the theme on the page container using this class.<\/td>\n\t\t\t<\/tr>\n\t\t<\/table>\n\t<\/div>\n<\/div><\/article>","protected":false},"excerpt":{"rendered":"<p>CSS classes for common styles<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[],"class_list":["post-18","post","type-post","status-publish","format-standard","hentry","category-css-framework"],"_links":{"self":[{"href":"https:\/\/api.jquerymobile.com\/1.4\/wp-json\/wp\/v2\/posts\/18","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/api.jquerymobile.com\/1.4\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/api.jquerymobile.com\/1.4\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/api.jquerymobile.com\/1.4\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/api.jquerymobile.com\/1.4\/wp-json\/wp\/v2\/comments?post=18"}],"version-history":[{"count":1,"href":"https:\/\/api.jquerymobile.com\/1.4\/wp-json\/wp\/v2\/posts\/18\/revisions"}],"predecessor-version":[{"id":19,"href":"https:\/\/api.jquerymobile.com\/1.4\/wp-json\/wp\/v2\/posts\/18\/revisions\/19"}],"wp:attachment":[{"href":"https:\/\/api.jquerymobile.com\/1.4\/wp-json\/wp\/v2\/media?parent=18"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/api.jquerymobile.com\/1.4\/wp-json\/wp\/v2\/categories?post=18"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/api.jquerymobile.com\/1.4\/wp-json\/wp\/v2\/tags?post=18"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}