> For the complete documentation index, see [llms.txt](https://dev.ubidots.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dev.ubidots.com/apps/styling-with-css/application-css.md).

# Application CSS

CSS classes to target application components.

## Overview

With application CSS, you can target the following components with full coverage:

* Table
* Sidebar
* Navigation bar
* Accordion

{% hint style="info" %}

* We will continue to expand CSS selector coverage for smaller components.
  {% endhint %}

This is how a branded application looks with Ubidots' native CSS styling:

<figure><img src="https://884329393-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MhzNRg0B4ECiNXc093G%2Fuploads%2F7SAqbhC6UGXgJNZHWJNm%2FSimple%20branded%20native%20app.png?alt=media&amp;token=a0920617-dd5f-4d47-92ca-495ba09c2a62" alt=""><figcaption></figcaption></figure>

With the CSS stylesheet below, the application can be changed to this:

<details>

<summary>Application CSS stylesheet</summary>

This example uses the application's branding colors through the `{{ colors.<colorKey> }}` [bookmark notation](/apps/styling-with-css.md#branding-colors) and [custom fonts](/apps/styling-with-css.md#custom-fonts).

```css
/* Ubidots-branded theme */

:root {
   /* Branding Colors */
   --color-icon-color: {{ colors.iconColor }};
   --color-navbar-color: {{ colors.navbarColor }};
   --color-variables-icon: {{ colors.variablesIcon }};
   --color-login-form-color: {{ colors.loginFormColor }};
   --color-sub-header-color: {{ colors.subHeaderColor }};
   --color-widget-background: {{ colors.widgetBackground }};
   --color-widget-title-color: {{ colors.widgetTitleColor }};
   --color-danger-button-color: {{ colors.dangerButtonColor }};
   --color-default-button-color: {{ colors.defaultButtonColor }};
   --color-main-table-item-color: {{ colors.mainTableItemColor }};
   --color-sub-header-text-color: {{ colors.subHeaderTextColor }};
   --color-dashboard-background: {{ colors.dashboardBackground }};
   --color-login-button-form-color: {{ colors.loginButtonFormColor }};
   --color-warning-modal-cover-color: {{ colors.warningModalCoverColor }};
   --color-variable-infobox-cover-color: {{ colors.variableInfoboxCoverColor }};
   --color-information-modal-cover-color: {{ colors.informationModalCoverColor }};
   --color-login-footer-foreground-color: {{ colors.loginFooterForegroundColor }};
   --color-data-source-infobox-cover-color: {{ colors.dataSourceInfoboxCoverColor }};
   --color-variable-infobox-derived-color: {{ colors.variableInfoboxDerivedColor }};

   /* Additional */
   --color-transparent: transparent;
   --color-surface-secondary: #f9f9f9;
   --color-empty: white;
   --ub-color-primary-050: #e8f7ee;

   /* Fonts */
   --font-family-primary: "Poppins", sans-serif;
   --font-weight-normal: 400;
   --font-weight-bold: bold;
   --font-size-small: 13px;

   /* Sizing & Spacing */
   --spacing-xs: 0.25rem;  /* 4px */
   --spacing-sm: 0.5rem;   /* 8px */
   --spacing-md: 1rem;     /* 16px */
   --spacing-lg: 2rem;     /* 32px */

   /* Component-Specific Sizes */
   --sidebar-width: 80px;
   --logo-width: 200px;
   --table-banner-height: 254px;
   --table-content-offset: calc(var(--table-banner-height) / -2);

   /* Borders & Radius */
   --border-radius-sm: 4px;
   --border-radius-md: 8px;

   /* Images */
   --devices-table-banner-image: url(https://d37r24zvv6zb85.cloudfront.net/production/media/ent_login_screen/68a00c069807fa008cab1a53_6a5018ea7f7944619c1fe0be36aee3f1.png);

   /* Box shadows */
   --shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* ==========================================================================
   Global
============================================================================= */
/* Font */
*:not([role="icon"]) {
   font-family: var(--font-family-primary);
}

/* Padding table viewports */
.core-view__container .ds-table__viewport {
   padding: 0
}

/* ==========================================================================
   Table Component (ds-table)
============================================================================= */
/* Table main components separation */
.ds-table__viewport {
   background-color: var(--color-transparent);
}

.ds-table__toolbar {
   background-color: white;
   border-radius: var(--border-radius-md);
}

.ds-table__wrapper {
   margin-top: var(--spacing-md);
   background-color: white;
   border-radius: var(--border-radius-md);
}

.ds-table__controls {
   margin-top: var(--spacing-md);
   background-color: white;
   border-radius: var(--border-radius-md);
}

/* Enable banner image in Device view */
.devices-table__content {
   transform: translateY(var(--table-content-offset));
}

.devices-table__banner {
   background-image: var(--devices-table-banner-image);
   height: var(--table-banner-height);
}

/* Alternating row colors */
.ds-table__body .ds-table__row:nth-child(odd) {
   background-color: rgb(from var(--color-sub-header-color) r g b / 0.1);
}

/* Hover and selected states */
.ds-table__body .ds-table__row:hover { 
   background: var(--color-surface-secondary);
}

.ds-table__row--selected {
  box-shadow: inset 4px 0 0 var(--color-sub-header-color);
}

/* ==========================================================================
   Sidebar Component (ds-sidebar, ds-accordion)
============================================================================= */
.ds-sidebar__item,
.ds-accordion__item {
   border-radius: var(--border-radius-sm);
   transition: transform 0.2s ease, box-shadow 0.2s ease;
   will-change: transform, box-shadow; /* Optional performance hint */
}

/* Hover effect */
.ds-sidebar__item:hover,
.ds-accordion__item:hover,
.ds-accordion__toggle:hover {
   transform: translateY(-2px);
   box-shadow: var(--shadow-hover);
}

/* Item selection */
.ds-sidebar__item--active,
.ds-accordion__item--active {
   background-color: var(--color-sub-header-color);
   box-shadow: var(--shadow-hover);
   color: var(--color-empty);
}

/* Toggle icons */
.ds-sidebar__toggle--open i::before {
   content: "\e24e";
}

.ds-sidebar__toggle--closed i::before {
   content: "\f061";
}
```

</details>

<figure><img src="https://884329393-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MhzNRg0B4ECiNXc093G%2Fuploads%2FhzZRieHZ6TxfQwpoKBM4%2FBranded%20CSS%20native%20app.png?alt=media&amp;token=080b668b-1f26-4b2c-8a9e-01cf1b711555" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://dev.ubidots.com/apps/styling-with-css/application-css.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
