Skip to content

Commit

Permalink
fix(button_card_templates): adjust alignment for moz
Browse files Browse the repository at this point in the history
Since firefox currently does not support the `alignment-baseline` attribute, the `dominant-baseline` attribute can be set to achieve a vertically centered alignment.
  • Loading branch information
Moritz authored Mar 19, 2021
1 parent c9dd19e commit 0547dff
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions button_card_templates.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
}
</style>
<circle cx="25" cy="25" r="${radius}" stroke="#b2b2b2" stroke-width="1.5" fill="none" />
<text x="50%" y="54%" fill="#8d8e90" font-size="14" text-anchor="middle" alignment-baseline="middle">${input}<tspan font-size="10">%</tspan></text>
<text x="50%" y="54%" fill="#8d8e90" font-size="14" text-anchor="middle" alignment-baseline="middle" dominant-baseline="middle">${input}<tspan font-size="10">%</tspan></text>
</svg>
`;
}
Expand Down Expand Up @@ -284,7 +284,7 @@
}
</style>
<circle cx="25" cy="25" r="20.5" stroke="${stroke_color}" stroke-width="1.5" fill="${fill_color}" />
<text x="50%" y="54%" fill="#8d8e90" font-size="14" text-anchor="middle" alignment-baseline="middle">${last_changed}</text>
<text x="50%" y="54%" fill="#8d8e90" font-size="14" text-anchor="middle" alignment-baseline="middle" dominant-baseline="middle">${last_changed}</text>
</svg>
`;
]]]
Expand Down

0 comments on commit 0547dff

Please sign in to comment.