bubble-modules.yaml
file to apply them to all cards.
+ code: |
+ /* CSS or JS templates (see examples below) */
+
+
+home-assistant-default:
+ name: Home Assistant default styling
+ version: "v1.1"
+ creator: "Clooos"
+ link: "https://github.com/Clooos/Bubble-Card/discussions/1230"
+ description: This module applies Home Assistant’s default styling to Bubble Card. To set it as the default, move it under default:
in the bubble-modules.yaml
file.
+ code: |
+ :host {
+ --bubble-button-accent-color: rgba(0,140,255,0.3); /* Edit this color if needed */
+ --bubble-main-background-color: var(--ha-card-background, var(--card-background-color, #fff));
+ --bubble-border-radius: var(--ha-card-border-radius, 12px);
+ --bubble-icon-border-radius: 32px;
+ --bubble-button-border-radius: var(--bubble-border-radius);
+ --bubble-climate-button-background-color: var(--bubble-icon-background-color);
+ --bubble-border: var(--ha-card-border-width, 1px) solid var(--ha-card-border-color, var(--divider-color, #e0e0e0));
+ --bubble-secondary-background-color: transparent;
+ }
+
+ .bubble-container {
+ -webkit-backdrop-filter: var(--ha-card-backdrop-filter, none);
+ backdrop-filter: var(--ha-card-backdrop-filter, none);
+ box-shadow: var(--ha-card-box-shadow, none);
+ box-sizing: border-box;
+ }
+
+ .bubble-icon-container,
+ .large .bubble-icon-container {
+ --mdc-icon-size: 22px;
+ min-width: 36px !important;
+ min-height: 36px !important;
+ }
+
+ .large .bubble-cover-card-container > .bubble-buttons {
+ --bubble-cover-main-background-color: none;
+ }
+
+ .bubble-range-fill {
+ --bubble-accent-color: var(--bubble-button-accent-color);
+ }
+
+ .bubble-sub-button.background-on::before,
+ .bubble-sub-button.background-off::before,
+ .bubble-temperature-container::before,
+ .bubble-icon-container::before {
+ content: "";
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ opacity: var(--control-number-buttons-background-opacity, .2);
+ border-radius: var(--bubble-border-radius);
+ background: var(--control-number-buttons-background-color, var(--disabled-color));
+ }
+
+ .is-on {
+ --bubble-icon-background-color: var(--view-background,var(--lovelace-background,var(--primary-background-color)));
+ transition: all ease-in 0.3s !important;
+ }
+
+ .bubble-icon-container::before {
+ background: var(--state-inactive-color);
+ border-radius: var(--bubble-icon-border-radius);
+ }
+
+ .bubble-sub-button {
+ border: 0px solid transparent !important;
+ }
+
+ .no-icon-select-arrow {
+ right: 4px !important;
+ }
+
+ .large .bubble-icon-container {
+ margin-left: 9px;
+ }
+
+ .bubble-state {
+ opacity: 1;
+ font-weight: 400;
+ font-size: 12px;
+ letter-spacing: .4px;
+ }
+
+ :not(.bubble-separator) > .bubble-name {
+ font-weight: 500;
+ font-size: 14px;
+ letter-spacing: 0.1px;
+ }
+
+ .bubble-pop-up-background {
+ filter: brightness(0.96); /* Improve pop-up background contrast */
+ --bubble-pop-up-border-radius: calc(var(--ha-card-border-radius, 12px) * 1.4);
+ }
+
+ .bubble-header-container {
+ --bubble-secondary-background-color: var(--background-color-2);
+ }
+
+ ha-select {
+ --bubble-list-item-accent-color: none !important;
+ --mdc-theme-surface: var(--card-background-color);
+ }
+
+ mwc-list-item[selected] {
+ color: inherit !important;
+ --mdc-ripple-press-opacity: 0 !important;
+ }
+
+ mwc-list-item[selected]::before {
+ content: "";
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ background-color: var(--primary-color);
+ opacity: 0.24;
+ }
+
+
+icon_container_color:
+ name: "Example: Customize the icon container color"
+ version: "v1.1"
+ creator: "Clooos"
+ link: "https://github.com/Clooos/Bubble-Card/discussions/1231"
+
+ unsupported:
+ - horizontal-buttons-stack
+ - separator
+
+ description: |
+ A list of predefined colors to customize the icon container color.
+ Configure this module via the editor or in YAML, for example:
+ + icon_container_color: + color: light-blue +
+ get_state_attribute: + - entity: weather.home + - entity: sensor.weather_station + attribute: humidity + - entity: sensor.weather_station + attribute: temperature +