# Core/Entity classes

Core and entity classes provide targeted styling capabilities for the Ubidots application. They let you apply CSS customizations either globally across the platform or to specific 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-core-entity-classes-matter" id="why-core-entity-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="/files/8KIAogcKi7h312A5tnKf" 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="/files/pXRhIa2MYUVuLUIpsC8l" 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 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 now, only the Device entity is supported. More modules will be available soon.
{% endhint %}

These classes apply to entity table views exposed in the Ubidots application, except Dashboards. They let you add an image banner or linear gradient to the entity table.

<figure><img src="/files/ozbcHVt4QozQxvGN01j4" alt=""><figcaption></figcaption></figure>

It follows the syntax:

```
<entity>-table__layout
```

```
<entity>-table__content
```

The layout class is only needed to hold two additional classes for the two banner options. The banner classes are:

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

Use each one based on the banner type you want to implement.

### Example

This CSS adds an image banner to 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 rendered HTML for the Devices view, including a banner, looks like this. This example 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 entity-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.
