Skip to content

Commit ce3d48a

Browse files
committed
Merge remote-tracking branch 'origin/dev' into feature/package-globals
2 parents 0b56e60 + efd4163 commit ce3d48a

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ export class UUIAvatarElement extends LitElement {
1515
display: inline-flex;
1616
align-items: center;
1717
justify-content: center;
18+
flex-shrink: 0;
1819
position: relative;
1920
overflow: hidden;
2021
border-radius: 50%;

packages/uui-loader-circle/lib/uui-loader-circle.element.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { css, html, LitElement } from 'lit';
21
import { defineElement } from '@umbraco-ui/uui-base/lib/registration';
3-
import { property, query } from 'lit/decorators.js';
2+
import { css, html, LitElement } from 'lit';
3+
import { property } from 'lit/decorators.js';
44
import { styleMap } from 'lit/directives/style-map.js';
55

66
/**
@@ -90,6 +90,9 @@ export class UUILoaderCircleElement extends LitElement {
9090
font-size: 0.3em;
9191
font-weight: 700;
9292
text-align: center;
93+
94+
/* Center the text */
95+
padding-top: 0.09em;
9396
}
9497
`,
9598
];
@@ -120,22 +123,19 @@ export class UUILoaderCircleElement extends LitElement {
120123
@property({ type: Boolean, reflect: true, attribute: 'show-progress' })
121124
showProgress = false;
122125

123-
@query('#svg-container')
124-
private _container: any;
125-
126126
private _resizeObserver = new ResizeObserver(() => this.onResize());
127127
private _isLarge = false;
128128

129129
firstUpdated() {
130-
this._resizeObserver.observe(this._container);
130+
this._resizeObserver.observe(this);
131131
}
132132

133133
disconnectedCallback() {
134134
this._resizeObserver.disconnect();
135135
}
136136

137137
onResize() {
138-
const newIsLarge = Number.parseFloat(this._container.clientHeight) >= 30;
138+
const newIsLarge = this.clientHeight >= 30;
139139

140140
if (this._isLarge != newIsLarge) {
141141
this._isLarge = newIsLarge;

0 commit comments

Comments
 (0)