Skip to content

Commit 46fde86

Browse files
feat: Add custom properties to uui-tag (#791)
* Add custom properties to uui-tag Extending uui-tag with custom properties in order to style it for the new modern umbraco cloud portal design. * Update uui-tag.element.ts
1 parent 9f07ae6 commit 46fde86

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

packages/uui-tag/lib/uui-tag.element.ts

+6-3
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ import {
1212
* @description Tag component from Umbraco UI components library. Comes in one shape, but different looks and sizes
1313
* @slot - slot for tag contents
1414
* @cssprop --uui-tag-font-size - overwrite the default font-size for the tag.
15+
* @cssprop --uui-tag-padding - overwrite the default padding size for the tag.
16+
* @cssprop --uui-tag-border-radius - overwrite the default border-radius for the tag.
17+
* @cssprop --uui-tag-border-color - overwrite the default border color for the tag.
1518
*/
1619

1720
@defineElement('uui-tag')
@@ -45,11 +48,11 @@ export class UUITagElement extends LitElement {
4548
font-size: var(--uui-tag-font-size, var(--uui-type-small-size));
4649
font-weight: 700;
4750
line-height: 1;
48-
padding: var(--uui-size-space-1) calc(var(--uui-size-space-1) + 0.5em);
51+
padding: var(--uui-tag-padding, var(--uui-size-space-1) calc(var(--uui-size-space-1) + 0.5em));
4952
border-radius: 100px;
5053
user-select: none;
51-
border-radius: var(--uui-size-4);
52-
border: 1px solid transparent;
54+
border-radius: var(--uui-tag-border-radius, var(--uui-size-4));
55+
border: 1px solid var(--uui-tag-border-color, transparent);
5356
}
5457
5558
slot {

0 commit comments

Comments
 (0)