Stacker
LoginSign upAstra Docs
  • Getting Started: Quick Guide
    • What is Stacker?
    • Key Features
    • Quick Overview of Stacker
    • What can I build in Stacker?
      • Creating a Home Page
      • Build an Internal Tool
    • Creating your first App
  • Stacker V 5(Astra) - Frequently Asked Questions
  • Account Settings
    • What is a Workspace?
      • Workspace Settings
      • Delete a Workspace
    • Adding Multiple Apps
      • Deleting an App
    • Subscriptions and Billing
  • Customer Access
    • Customer Access
  • Layout types
    • Layout Types
      • Layouts vs Custom Pages
    • Adding Custom Pages in Stacker
    • Detail Layout
      • Detail page widgets
        • Detail: Text Widget
        • Detail: Related Record Widget
        • Detail: Related Record List
          • Related record list widget not showing option
        • Detail: Quick Links Widget
        • Detail: Pipeline Widget
        • Detail: Highlights Widget
        • Detail: Fields Widget
          • Detail: Field Options
          • Separating fields into sections
        • Detail: Embed Widget
          • Embedding Google Maps
          • Embedding Airtable
          • Embedding Loom Videos
          • Embedding Vimeo
          • Embedding Youtube
          • Embedding Google Drive videos
          • Embedding Google Drive Images
          • Embedding content on a detail page
        • Detail: Callout Widget
        • Detail: Banner Widget
        • Detail: Big Numbers Widget
        • Detail: Charts Widget
      • Detail: Delete Record Button
      • Detail: Edit Button
      • Detail: Record Header
        • Change the title on the detail page
      • Detail: Tabs
        • Detail: Activity Tab
    • List Layout
      • Calendar Layout
      • List Options
        • List: Sort
        • List: Cover Image
        • List: Roles
        • List Layout: Change layout title
        • List: Inline Filters
        • List: Header
        • List: Duplicate Layout
        • List: Filter
        • Allow users to download list data as CSV
        • List: Relative Date Filtering
        • List: Field options
        • List: Show, Hide, and Reorder Fields
    • Customize the Form Layout
      • Creating multi step form
      • Auto-filling values into create forms
      • Set default values on Forms
    • Stacker Navigation
      • Navigation: Showing and hiding tables
      • Enable Breadcrumb Navigation
  • Permissions and Security
    • Introduction to Permissions
    • Configure a Permission Rule
      • Table Permissions
        • Editing Permissions
        • Multiple permission rules
    • Set up User Roles
      • Automatically assign Roles
    • Conditional Visibility
  • Customization
    • Client Logos
    • Customizing App Appearance
    • Getting started with CSS in Stacker
    • Custom CSS
    • Workspace Appearance
    • Custom Domain
      • Custom Domain not working
    • Whitelabel
    • Custom Scripts
    • Creating Buttons
      • Action Buttons
      • Add new button showing when it shouldn't
    • Translate your Stacker App
  • Users
    • Introduction to users in Stacker
    • Users: Overview
    • Users: Workspace Collaborators
      • Workspace Users
    • Users: App Users
      • Adding users to your app
      • Login flow for users
      • Open Signup
      • Registering and Logging in
    • Previewing an app as a user for testing
  • Data
    • Formula field
    • Rich Text
    • Third Party Integrations
      • FullStory integration
      • Intercom Integration
      • Zapier Integration
        • Sending an email with Zapier
      • Airtable
        • Syncing Schema and Data
        • Update Sharing link password
        • Real time Airtable sync
        • Upgrading Airtable data connections
        • Enabling tables and fields
    • Enable Color on Single and Multi Select Fields
    • Apply dynamic data filter to Link Fields
    • Importing data into Stacker
      • Importing data from CSV
    • Applying table data filters
    • Exporting data from Stacker
    • Creating lookups and rollups between tables
      • Creating links between tables
    • Stacker Tables: Editing field names and types
      • Stacker Tables: Pasting Data
      • Stacker Tables: Linked Fields
      • Stacker Tables: Editing and deleting tables
      • Stacker Tables: Creating a new table
      • Stacker Tables: Adding new fields
      • Stacker Tables: Adding and Editing Rows
      • Stacker Fields
  • Troubleshooting
    • There was an error saving your record
    • Unable to toggle on linked fields
Powered by GitBook
On this page
  1. Customization

Getting started with CSS in Stacker

PreviousCustomizing App AppearanceNextCustom CSS

Last updated 1 month ago

What is CSS?

CSS (Cascading Style Sheets) is a language used in software to define how a website or app should look. In Stacker, you can use it to change how specific parts of your app look. For instance, you could change the background color of your app, the shape of your buttons, or the amount of drop shadow under a record.

This tutorial is for people who are new to using CSS. By the end of the tutorial you will have a good idea of how to get started using it in Stacker.

Using CSS in Stacker

Let’s start by understanding how CSS works within Stacker. To change how something in your app looks, you need to know its class. The class is the text used to describe the thing you want to change in your app. For instance, if you wanted to change how your Save button looks, you’d use the class .stk-save-button or if you wanted to change the text in your app, you’d use .stk-text.

You then need to tell Stacker what attribute of that class you want to change, and this is put within curly brackets. Let’s try out a couple of examples.

To input CSS, click App settings → Appearance → Custom CSS.

To change the background color of your app, you can target the .stk-content class. Here’s an example:

.stk-content {
  background-color:#f6f6f1;
}

This gives our background this off-white color:

Untitled__23_.png

Or, we could change the background color and height of the Add New button using the .stk-add-new-button class:

.stk-add-new-button {
  background-color:#7FA4B3;
  height:40px;
}

This makes our button a bit taller and changes its color:

Now, let’s say we want to change how the a table on a list view looks. We could change the background color of both the list and the header, as well as giving it a more visible border.

.stk-table {
  background-color:#E8F8FF;
  border:solid;
  border-color:#7FA4B3;
}
.stk-table-header {
background-color:#CFF1FF;
}

Which gives us the below:

We could also make it so when you hover over a row it’s highlighted using the :hover selector:

.stk-table-row:hover {
  background-color:#7FA4B3;
}

You can also use :hover for buttons to change how they look when a user hovers over them.

Accessibility

Something consider when changing the colors in your app: You always want to think about accessibility. Ask yourself: Is the text still readable?

These changes we’re making are currently affecting all tables in our app. It might be that you only want to change how a list view looks on a particular page. To do that, use this handy snippet of CSS:

.stk-page-PAGE_NAME .stk-table {
  background-color:#E8F8FF;
  border:solid;
  border-color:#7FA4B3;
}
.stk-table-header {
background-color:#CFF1FF;
}

Where PAGE_NAME is the name of your page (you can get this from the page URL).

Dynamic CSS classes in Stacker

One important thing - if you’re familiar with developer tools, you’ll find you can reveal CSS classes in your app that look like css-o342e34 - these CSS classes are generated by Stacker, and are subject to change without notice. So while your app might look ok at the time of you inputting the CSS, there’s no guarantee it will remain that way in the future.

We’ve used the background-color property combined with a hex code to choose a color. You can use a tool like to create hex codes.

Untitled__24_.png

You can also use some color names like CornflowerBlue rather than hex codes - there’s a full list here: .

Untitled__25_.png
Untitled.gif

Now you’re familiar with the basics, you can start using the CSS classes listed in our article to customise your app. And check out to understand more about what you can change about each class. There are loads of options that let you change the shape, color, size, font, etc.

Adobe Color
HTML Color Names
Custom CSS
w3schools