-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(Skeleton): Sbanken styling (#2622)
Use Sbanken grey tone. Refactored the skeleton style and relocated the globally required `--skeleton-color` and `--skeleton-color-contrast` variables following a discussion with @snorrekim .
- Loading branch information
Showing
20 changed files
with
135 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+17.8 KB
...mage_snapshots__/skeleton-for-sbanken-have-to-match-a-removed-skeleton.snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+25 KB
...apshots__/skeleton-for-sbanken-have-to-match-all-components-horizontal.snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+35 KB
...snapshots__/skeleton-for-sbanken-have-to-match-all-components-vertical.snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+7.33 KB
...age_snapshots__/skeleton-for-sbanken-have-to-match-excluded-components.snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+3.93 KB
...snapshots__/skeleton-for-sbanken-have-to-match-skeleton-article-figure.snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Binary file added
BIN
+3.92 KB
...mage_snapshots__/skeleton-for-ui-have-to-match-skeleton-article-figure.snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed
BIN
-1.36 KB
...s__/__image_snapshots__/skeleton-have-to-match-skeleton-article-figure.snap.png
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
packages/dnb-eufemia/src/components/skeleton/style/themes/dnb-skeleton-theme-sbanken.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/* | ||
* No theme is provided | ||
* | ||
* Theming variables for the Skeleton component is required globally | ||
* and is thus defined in src/style/themes/theme-sbanken/customisations.scss | ||
* | ||
*/ |
90 changes: 4 additions & 86 deletions
90
packages/dnb-eufemia/src/components/skeleton/style/themes/dnb-skeleton-theme-ui.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,89 +1,7 @@ | ||
/* | ||
* Skeleton Theme | ||
* No theme is provided | ||
* | ||
* Theming variables for the Skeleton component is required globally | ||
* and is thus defined in src/style/themes/theme-ui/ui-theme-basis.scss | ||
* | ||
*/ | ||
|
||
:root { | ||
--skeleton-color: var(--color-black-8); | ||
--skeleton-color--contrast: var(--color-white); | ||
} | ||
|
||
.dnb-skeleton { | ||
--skeleton-delay: 5s; | ||
|
||
img, | ||
video { | ||
filter: brightness(0%) contrast(0%) opacity(0.5); | ||
} | ||
|
||
&--shape#{&}::before { | ||
background-color: var(--skeleton-color) !important; // to take presence | ||
} | ||
|
||
&--shape#{&}::after { | ||
background-image: repeating-linear-gradient( | ||
-45deg, | ||
var(--skeleton-color--contrast) 1px 2px, | ||
transparent 0 6px | ||
) !important; | ||
background-repeat: repeat !important; | ||
background-size: 100% !important; // to take presence | ||
|
||
clip-path: polygon(100% 0, 100% 0, 100% 100%, 100% 100%); | ||
animation: skeletonLinearAnimation 1.5s linear infinite | ||
var(--skeleton-delay); | ||
} | ||
|
||
// Font | ||
&--font-only, | ||
&--font, | ||
&--font &--show-font, | ||
&--font .dnb-p { | ||
// Additional changes | ||
&::marker { | ||
color: var(--skeleton-color); | ||
} | ||
} | ||
|
||
// Font | ||
&--font, | ||
&--font &--show-font, | ||
&--font .dnb-p { | ||
background-image: repeating-linear-gradient( | ||
-45deg, | ||
var(--skeleton-color--contrast) 1px 2px, | ||
transparent 0 6px | ||
) !important; | ||
|
||
--border-color: var(--skeleton-color); | ||
background-color: var(--skeleton-color) !important; | ||
|
||
background-position-x: 30rem; | ||
animation: skeletonFontAnimation 5s linear infinite | ||
var(--skeleton-delay); | ||
} | ||
} | ||
|
||
@keyframes skeletonLinearAnimation { | ||
0% { | ||
clip-path: polygon(100% 0, 100% 0, 100% 100%, 100% 100%); | ||
} | ||
|
||
50% { | ||
clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); | ||
} | ||
|
||
100% { | ||
clip-path: polygon(0 0, 0% 0, 0% 100%, 0 100%); | ||
} | ||
} | ||
|
||
@keyframes skeletonFontAnimation { | ||
0% { | ||
background-position-x: 30rem; | ||
} | ||
|
||
100% { | ||
background-position-x: -30rem; | ||
} | ||
} |
Binary file modified
BIN
+75 Bytes
(100%)
...napshots__/table-with-skeleton-for-sbanken-have-to-match-default-table.snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters