Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(Skeleton): text firefox #2600

Open
wants to merge 4 commits into
base: next
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/css/skeleton.css
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
display: inline;
font-size: 0.8em; /* Scale down font to have larger gap between lines */
letter-spacing: 0.1em; /* But scale up letter-spacing to have circa same line-length */
word-break: break-word;
}

/* When having children, let them define size */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ export default {

export const Preview: Story = {
args: {
width: '200px',
height: '100px',
width: 200,
height: 100,
},
};

Expand All @@ -46,7 +46,7 @@ export const UsageExample: StoryFn<typeof Skeleton> = () => {
return (
<div
style={{
width: '400px',
maxWidth: 400,
}}
>
<Skeleton height='150px' />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export const Skeleton = forwardRef<HTMLSpanElement, SkeletonProps>(
) {
const Component = asChild ? Slot : 'span';
const isText = variant === 'text';
const childrenText = isText && '-'.repeat(Number(width) || 1); // s followed by a &shy; makes the most average character length
const childrenText = isText && '-'.repeat(Number(width) || 1);
const animationRef = useSynchronizedAnimation<HTMLSpanElement>(
'ds-skeleton-opacity-fade',
);
Expand Down
Loading