⚪ Bubble Card - A minimalist card collection for Home Assistant with a nice pop-up touch

If you’re willing to get very deep into CSS there is a way to get a bubble-button-card to be a 2x2.

image

But just to get this much working I had to do all this CSS:

.card-content {
  width: 100%;
  margin: 0 !important;
}

.large .bubble-button-card-container {
  height: 184px !important;
  overflow: hidden !important;
}

.bubble-button-card {
  display: grid;
  grid-template-areas:
    'n n n b'
    'l l l b'
    'i i . b'
    'i i . b';
  grid-template-columns: 1fr 1fr 1fr 1fr;
  grid-template-rows: 1.5fr 0.5fr 1fr 1fr;
  justify-items: center;
}

.bubble-icon-container {
  grid-area: i;
  border-radius: 50% !important;
  width: 150% !important;
  height: 150% !important;
  max-width: none !important;
  max-height: none !important;
  position: absolute !important;
  # left: -33% !important;
  # top: -33% !important;
  # transform: translate(-50%, -50%) !important;
  # margin-top: 25% !important;
  # margin-left: -25% !important;
  place-self: center !important;
  margin: 0px 0px 20px 20px !important;
  padding: 0px, 0px, 0px, 0px !important;
}

.bubble-icon {
  position: relative !important;
  --mdc-icon-size: 100px !important;
  opacity: 0.5 !important;
}

.bubble-name-container {
  # width: 100%;
  grid-area: n;
  justify-self: start;
  margin-left: 20px;
  max-width: calc(100% -(12px + 0px));
}

.bubble-name {
  font-weight: bold;
  font-size: 16px;
}

.bubble-state {
  font-weight: bold;
  font-size: 14px;
}

.rows-2 .bubble-sub-button-container {
  grid-area: b;
  display: flex !important;
  flex-wrap: wrap;
  flex-direction: column;
  justify-content: flex-start;
  # width: 40px;
  # grid-template-columns: min-content;
  # grid-template-rows: repeat(5, 1fr);
  width: auto !important;
  padding-right: 0px;
  height: 100% !important;
  margin-top: 25px;
}

.bubble-sub-button {
  min-width: 36px !important;
}

Not to mention I also had to make sure to change the card to be a 2x2 in the layout tab from HA for the card UI.

5 Likes