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

feat(skeleton-loader): new module #2177

Merged
merged 25 commits into from
Dec 1, 2023
Merged
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
73c56a6
feat(skeleton-loader): new module
saiponnada Sep 11, 2023
4c72e81
feat(skeleton-loader): added tile layout
saiponnada Oct 6, 2023
1e2d3fa
feat(skeleton-loader): added AI variant
saiponnada Oct 6, 2023
4ff9eea
feat(skeleton-loader): refactor aria-hidden to use semantic hidden
saiponnada Oct 10, 2023
8bc0b64
refactor: skeleton tile and layout changes
saiponnada Oct 12, 2023
6ae0148
fix: css animations
saiponnada Oct 20, 2023
16161ee
refactor(skeletons): to use css vars
saiponnada Oct 25, 2023
16a2b25
refactor(skeletons): added stories
saiponnada Oct 25, 2023
52ef229
refactor(skeletons): added container queries to images
saiponnada Oct 25, 2023
a685b75
feat(skeletons): added elevated styles
saiponnada Oct 31, 2023
e2c0e1e
feat(skeletons): updated docs
saiponnada Oct 31, 2023
efded5c
feat(skeltons): added AI gradient variants
saiponnada Nov 1, 2023
c472add
feat(skeleton): refactored skeleton to use :empty
saiponnada Nov 2, 2023
d52bad7
docs(skeleton): updated docs
saiponnada Nov 2, 2023
9a50437
feat(skeleton): refactored skeleton to remove :empty
saiponnada Nov 3, 2023
6e73434
refactor: code review changes
saiponnada Nov 8, 2023
c1604a0
refactor(skeletons): code review changes
saiponnada Nov 9, 2023
f981169
docs(skeleton): added BETA tag
saiponnada Nov 10, 2023
ba9fa64
refactor(skeletons): code review changes contd
saiponnada Nov 14, 2023
59bff8b
refactor(skeletons): doc changes
saiponnada Nov 14, 2023
1bc49a1
docs(skeletons): updated docs
saiponnada Nov 14, 2023
e199fac
docs(skeleton): more review changes
saiponnada Nov 17, 2023
a921599
docs(skeletons): updated examples verbiage
saiponnada Nov 20, 2023
14f8dcf
feat(skeleton): layout changes
saiponnada Nov 28, 2023
0cc80ee
chore: rolledback gemfile changes
saiponnada Nov 28, 2023
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
Prev Previous commit
Next Next commit
refactor: skeleton tile and layout changes
saiponnada committed Nov 27, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 8bc0b641ba356bb8d4ba89a9619894c71e5bd9d8
76 changes: 54 additions & 22 deletions dist/skeleton-loader/skeleton-loader.css
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
:root {
--skeleton-background: var(--color-loading-fill);
--skeleton-default-height: 40px;
--skeleton-tile-width-min: 121px;
--skeleton-tile-width-max: 224px;
}
/*
Setting a default height of 40px makes any one use skeleton class
Should we restrict this to using just as a building block instead?
*/
.skeleton {
background: var(--skeleton-background);
cursor: progress;
height: 40px;
height: var(--skeleton-default-height);
min-height: 12px;
width: 100%;
}
.skeleton--avatar {
border-radius: 50%;
@@ -19,18 +19,15 @@ Should we restrict this to using just as a building block instead?
overflow: hidden;
width: 48px;
}
/*
Should we rename button to btn for consistency?
*/
.skeleton--button {
.skeleton--btn {
border-radius: 20px;
height: 40px;
}
.skeleton--button-small {
.skeleton--btn-small {
border-radius: 16px;
height: 32px;
}
.skeleton--button-large {
.skeleton--btn-large {
border-radius: 24px;
height: 48px;
}
@@ -40,40 +37,56 @@ Should we rename button to btn for consistency?
}
.skeleton--text-small::after {
height: 16px;
margin: 24px 80px 0 0;
margin-top: 24px;
}
.skeleton--text-large {
border-radius: 3px;
height: 24px;
}
.skeleton--text-large::after {
height: 24px;
margin: 32px 80px 0 0;
margin-top: 32px;
}
.skeleton--text-two-row {
.skeleton--text-multiline {
position: relative;
width: calc(100% - 24px);
}
.skeleton--text-two-row::after {
background: var(--skeleton-background);
.skeleton--text-multiline::after {
background: inherit;
content: "";
position: absolute;
width: calc(100% - 80px);
width: calc(100% - 56px);
}
.skeleton--text-small.skeleton--text-two-row {
.skeleton--text-small.skeleton--text-multiline {
margin-bottom: 24px;
}
.skeleton--text-large.skeleton--text-two-row {
.skeleton--text-large.skeleton--text-multiline {
margin-bottom: 32px;
}
.skeleton--form {
border-radius: 8px;
height: 48px;
}
.skeleton--tile-layout {
.skeleton--tiles-layout {
display: inline-block;
list-style: none;
margin: 0;
padding: 0;
width: 100%;
}
.skeleton--tiles-layout li {
display: inline-table;
margin: 4px;
}
.skeleton--tile {
max-width: var(--skeleton-tile-width-max);
min-width: var(--skeleton-tile-width-min);
}
.skeleton--tile .skeleton--text-small,
.skeleton--tile .skeleton--text-large {
width: calc(100% - 24px);
}
.skeleton--tile-layout .skeleton__image-container {
.skeleton--tile .skeleton__image-container {
margin-bottom: 12px;
padding-bottom: 100%;
position: relative;
@@ -84,7 +97,7 @@ Should we rename button to btn for consistency?
height: 100%;
max-width: initial;
}
.skeleton--tile-layout .skeleton--image {
.skeleton__image-container .skeleton--image {
bottom: 0;
height: 100%;
left: 0;
@@ -93,6 +106,25 @@ Should we rename button to btn for consistency?
top: 0;
width: 100%;
}
/* Columns */
.skeleton--tiles-layout[data-columns="2"] li {
width: calc(100% / 2 - 11px);
}
.skeleton--tiles-layout[data-columns="3"] li {
width: calc(100% / 3 - 11px);
}
.skeleton--tiles-layout[data-columns="4"] li {
width: calc(100% / 4 - 11px);
}
.skeleton--tiles-layout[data-columns="5"] li {
width: calc(100% / 5 - 11px);
}
.skeleton--tiles-layout[data-columns="6"] li {
width: calc(100% / 6 - 11px);
}
[dir="rtl"] .skeleton--text-multiline::after {
left: 56px;
}
@keyframes loading-frames {
0% {
background-position: 0% 0%;
1 change: 1 addition & 0 deletions dist/variables/variables.less
Original file line number Diff line number Diff line change
@@ -57,6 +57,7 @@
@spacing-400: @spacing-100 * 4;
@spacing-450: @spacing-100 * 4.5;
@spacing-600: @spacing-100 * 6;
@spacing-700: @spacing-100 * 7;
@spacing-800: @spacing-100 * 8;

@font-size-giant-3: @font-size-46;
Loading