@blockspoon/cert-badge-renderer 1.0.29 → 1.0.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -186,10 +186,8 @@ export async function generateAchievementHTML(
186
186
  ? "flex-start"
187
187
  : "flex-end"
188
188
  };
189
- padding-left: "0";
190
- padding-right: "0";
191
- word-break: break-word;
192
- white-space: pre-wrap;
189
+ word-break: ${element.bindingKey === "badge" ? "break-word" : "normal"};
190
+ white-space: ${element.bindingKey === "badge" ? "pre-wrap" : "normal"};
193
191
  opacity: ${element.opacity || 1};
194
192
  `;
195
193
 
@@ -162,7 +162,7 @@ export async function generateDesignHTML(
162
162
  font-family: ${element.fontFamily || "inherit"};
163
163
  color: ${element.color || "black"};
164
164
  border: none;
165
- padding: "0";
165
+ padding: 0;
166
166
  display: flex;
167
167
  align-items: start;
168
168
  justify-content: ${
@@ -172,10 +172,8 @@ export async function generateDesignHTML(
172
172
  ? "flex-start"
173
173
  : "flex-end"
174
174
  };
175
- padding-left: "0";
176
- padding-right: "0";
177
- word-break: break-word;
178
- white-space: pre-wrap;
175
+ word-break: ${isBadge ? "break-word" : "normal"};
176
+ white-space: ${isBadge ? "pre-wrap" : "normal"};
179
177
  opacity: ${element.opacity || 1};
180
178
  `;
181
179