Skip to content

Making a card mod theme template

Kendell R edited this page Oct 16, 2020 · 1 revision

Card mod themes can be written once, such as with a compact header configuration, and called in the themes you want. Just add card-mod-theme to your original theme and point the value to the theme with the styling you want.

Here's an example template theme:

compact-header:  # This is the name you'll use in your theme.
  # Header
  card-mod-root-yaml: |
    paper-tabs$: |
      .not-visible {
        display: none;
      }
      /*Uncomment this if you want the header on the bottom
      #selectionBar {
        bottom: unset !important;
      }
      */
      /* --snip, not the full thing, don't copy from here-- */

Here's an example applying styling:

midnight:
  card-mod-theme: compact-header  # Add this line to apply the styling
  accent-color: "#E45E65"
  card-background-color: "var(--primary-background-color)"
  dark-primary-color: "var(--accent-color)"
  disabled-text-color: "#7F848E"
  divider-color: "rgba(0, 0, 0, .12)"
  google-blue-500: "#4285f4"
  # --snip--
Clone this wiki locally