# Core/Entity Classes

Core and entity classes provide targeted styling capabilities for the Ubidots application, allowing you to apply CSS customizations either globally across the entire platform or specifically to individual entities. These classes are essential for creating consistent theming and entity-specific customizations without affecting other parts of the application.

## Why Core/Entity Classes Matter <a href="#why-coremodule-classes-matter" id="why-coremodule-classes-matter"></a>

**Global Consistency**: The `core-view__container` class enables platform-wide styling changes that affect every view in the application, ensuring visual consistency across all entities.

**Entity Isolation**: Entity-specific classes like `devices-view__container` allow you to customize individual views without impacting other parts of the application, providing precise control over each entity's appearance.

**Scalable Customization**: This system supports both broad theming changes and granular entity customizations, making it easy to maintain brand consistency while accommodating specific functional requirements.

## Core & Entity Specific Classes

{% tabs %}
{% tab title="Core" %}
Applied to every view container across the entire Ubidots application.

```
core-view__container
```

**Use cases:**

* Platform-wide color schemes.
* Global typography settings.
* Universal spacing and layout adjustments.

<figure><img src="https://884329393-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MhzNRg0B4ECiNXc093G%2Fuploads%2F2KihYyUQlTledOZOo0vj%2Fcore-view__container.png?alt=media&#x26;token=7918a04b-bf7c-4a5d-9ece-ea4c5b5726b6" alt=""><figcaption></figcaption></figure>

### **Example**

```css
.core-view__container {
  font-family: 'Custom Brand Font', sans-serif;
  background-color: var(--global-background);
  min-height: 100vh;
}
```

{% endtab %}

{% tab title="Entity container" %}
Applied to every entity container that's exposed in the Ubidots application. It follows the syntax:

```
<entity>-view__container
```

**Use cases:**

* Entity-specific color coding.
* Custom layouts for each entity.
* Entity-specific spacing and typography.

<figure><img src="https://884329393-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MhzNRg0B4ECiNXc093G%2Fuploads%2FbZ599fMHGGtNEdEiW9Aw%2F_module_-view__container.png?alt=media&#x26;token=277cb2e4-ae86-4610-ab3f-38bae21c2853" alt=""><figcaption></figcaption></figure>

**Available entity classes are:**

<table><thead><tr><th width="188.59765625">Entity</th><th>Class</th></tr></thead><tbody><tr><td>Devices</td><td><code>devices-view__container</code></td></tr><tr><td>Device groups</td><td><code>device_groups-view__container</code></td></tr><tr><td>Dashboards</td><td><code>dashboards-view__container</code></td></tr><tr><td>Events</td><td><code>events-view__container</code></td></tr><tr><td>Event's logs</td><td><code>events_logs-view__container</code></td></tr><tr><td>Reports</td><td><code>reports-view__container</code></td></tr><tr><td>Users</td><td><code>users-view__container</code></td></tr><tr><td>Organizations</td><td><code>organizations-view__container</code></td></tr></tbody></table>

### **Example**

```css
.devices-view__container {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.devices-view__container .ds-table {
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}
```

{% endtab %}
{% endtabs %}

## Entity banner classes

{% hint style="warning" %}

* For the time being, only the Device entity is supported. More module will be available soon.
  {% endhint %}

These classes are applied to the Entity table views that are exposed in the Ubidots application (except Dashboards). It allows inserting an image banner or linear gradient in the entity table.&#x20;

<figure><img src="https://884329393-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MhzNRg0B4ECiNXc093G%2Fuploads%2FE1QSubMihlF9IrFWHW6y%2FImage%20banner.png?alt=media&#x26;token=cc09ba86-3e4b-489e-9af2-a2489ea09b18" alt=""><figcaption></figcaption></figure>

It follows the syntax:

```
<entity>-table__layout
```

```
<entity>-table__content
```

The layout class isn't need it for anything else than holding 2 additional classes for the 2 banner options. The banner clases are:

* `<entity>-table__banner`
* `<entity>-table__banner-gradient`

Each one should be used respectively for the type of banner to implement.&#x20;

### Example

This is the CSS that allows having an image banner in the Devices view:

```css
:root {
   /* Component-Specific Sizes */
   --table-banner-height: 254px;
   --table-content-offset: calc(var(--table-banner-height) / -2);

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

/* 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);
}
```

## Rendered DOM

The output HTML, for example for the Devices view, including a banner, would be as follows. This is taken directly from the application:

<pre class="language-html"><code class="lang-html">&#x3C;div id="root">
  &#x3C;div class="sc-cdmDIG lerfa">
    &#x3C;!--Sidebar -->
    &#x3C;aside class="sc-jjRXMV bkmJAK" data-open="false" data-testid="sidebar">
      &#x3C;!--Content of the sidebar -->
    &#x3C;/aside>
    &#x3C;!--Main content -->
    &#x3C;main class="<a data-footnote-ref href="#user-content-fn-1">devices-view__container core-view__container</a>">
      &#x3C;!--Context bar -->
      &#x3C;section>
        &#x3C;div>
          &#x3C;h1>Devices&#x3C;/h1>
        &#x3C;/div>
      &#x3C;/section>
      &#x3C;div class="devices-table__layout">
        &#x3C;div>
          &#x3C;!--Banners -->
          &#x3C;div class="devices-table__banner" role="presentation">&#x3C;/div>
          &#x3C;div class="devices-table__banner-gradient" role="presentation">&#x3C;/div>
        &#x3C;/div>
        &#x3C;!--Devices view content -->
        &#x3C;div class="devices-table__content">
          &#x3C;!--Content of the Devices view -->
        &#x3C;/div>
      &#x3C;/div>
    &#x3C;/main>
  &#x3C;/div>
&#x3C;/div>
</code></pre>

[^1]: Core and module specific classes


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://dev.ubidots.com/apps/styling-with-css/application-css/core-entity-classes.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
