From 0d721d854a85945dae76d9427b4602f1cdc9504a Mon Sep 17 00:00:00 2001 From: Robert Hjalmers Date: Wed, 3 Jun 2020 17:16:30 +0200 Subject: [PATCH 1/6] feat(skeleton-loader): add mask for list group --- scss/styles/_skeleton-loader.scss | 10 ++++++++++ .../skeleton-loader.component.html | 8 ++++++++ svg/list-mask.svg | 12 ++++++++++++ svg/mask-template.psd | Bin 233435 -> 327889 bytes 4 files changed, 30 insertions(+) create mode 100644 svg/list-mask.svg diff --git a/scss/styles/_skeleton-loader.scss b/scss/styles/_skeleton-loader.scss index 6170468..7e02bb2 100644 --- a/scss/styles/_skeleton-loader.scss +++ b/scss/styles/_skeleton-loader.scss @@ -2,6 +2,7 @@ $skeleton-loader-mask-color: $white; $skeleton-loader-mask: escape-svg(str-replace(url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='768' height='332'%3E%3Cpath d='M0 0h768v332H0V0zm0 0h220v48H0V0zm0 64h308v96H0V64zm0 112h418v96H0v-96zM324 64h444v96H324V64zm110 112h304v96H434v-96zM0 288h188v44H0v-44zm204 0h154v44H204v-44z' fill='#{$skeleton-loader-mask-color}' fill-rule='evenodd' /%3E%3C/svg%3E"), "#", "%23")); $skeleton-loader-mask-fill-pixel: escape-svg(str-replace(url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1' height='1'%3E%3Cpath fill='#{$skeleton-loader-mask-color}' d='M0 0h1v1H0z'/%3E%3C/svg%3E"), "#", "%23")); $skeleton-loader-mask-table: escape-svg(str-replace(url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='768' height='180'%3E%3Cpath d='M0 0h768v180H0V0zm0 10h90v24H0V10zm0 45h70v24H0V55zm0 45h80v24H0v-24zm0 45h90v24H0v-24zM114 10h100v24H114V10zm0 45h120v24H114V55zm0 45h130v24H114v-24zm0 45h110v24H114v-24zM268 10h100v24H268V10zm0 45h80v24h-80V55zm0 45h100v24H268v-24zm0 45h110v24H268v-24zM402 10h90v24h-90V10zm0 45h70v24h-70V55zm0 45h80v24h-80v-24zm0 45h90v24h-90v-24zM516 10h90v24h-90V10zm0 45h110v24H516V55zm0 45h120v24H516v-24zm0 45h100v24H516v-24zm144 0h84v24h-84v-24zm0-45h74v24h-74v-24zm0-45h64v24h-64V55zm0-45h84v24h-84V10zM0 44h768v1H0v-1zm0 45h768v1H0v-1zm0 45h768v1H0v-1zm0 45h768v1H0v-1z' fill='#{$skeleton-loader-mask-color}' fill-rule='evenodd' /%3E%3C/svg%3E"), "#", "%23")); +$skeleton-loader-mask-list: escape-svg(str-replace(url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1' height='40'%3E%3Cpath fill='#{$skeleton-loader-mask-color}' d='M0 24h1v16H0z'/%3E%3C/svg%3E"), "#", "%23")); .skeleton-loader { position: relative; overflow: hidden; @@ -36,6 +37,15 @@ $skeleton-loader-mask-table: escape-svg(str-replace(url("data:image/svg+xml,%3Cs width: 100vw; top: 0; } + &.skeleton-loader-list { + max-width: 320px; + height: 224px; + &::before { + background-size: 1px 40px; + background-repeat: repeat; + background-image: $skeleton-loader-mask-list; + } + } &.skeleton-loader-table { max-height: 100%; height: 181px; diff --git a/src/example/components/skeleton-loader/skeleton-loader.component.html b/src/example/components/skeleton-loader/skeleton-loader.component.html index 414f712..a70ddd7 100644 --- a/src/example/components/skeleton-loader/skeleton-loader.component.html +++ b/src/example/components/skeleton-loader/skeleton-loader.component.html @@ -22,6 +22,14 @@

Skeleton for content (default)

+
+

Skeleton for list content

+
+

The skeleton loader for list content will use the full width of its container, however the mask will never be wider than 320px.

+
+ +
+

Skeleton fill

diff --git a/svg/list-mask.svg b/svg/list-mask.svg new file mode 100644 index 0000000..acf1d8f --- /dev/null +++ b/svg/list-mask.svg @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/svg/mask-template.psd b/svg/mask-template.psd index 6967c4bc9d025be81f57c94baf8b462ce9fdbc58..10452e87b7d79700a2222fc48297da8fa68751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q`@+YZP3%HDl>%&rW-yF;_U^hn&b5YUNz+3~ECotmUja+^d$(w)rp zyLpGUn;q#B{hr1PS+BHYUpD3>ic>OZi$Cc8!5ilay-FuCJeAA2`JxW1@<=f^7CZx0 zG_gj9rdY!cSmkA9Z@M7enCq!CUCh$qpQhjJ@?0T2KI5C8!X009sH0T2KI5C8!X009sH0T2KI5C8!X009sH z0T2KI5C8!X009sH0T2KI5CDNoOyG@|AiXz;i~Dz>_wU{$s{8Lk=eJ2z_upcj--Xh> zl=fX>uD?DJ{PTPCTsfU9-b%K);_}-n9X*%MfAm~?bH!50HdkD*U1S2~xgOX80T2KI z5C8!X009sH0T2KI5C8!X009sH0T2KI5C8!X009sH0T2KI5C8!X009sH0T2KI5C8!X z009sH0T2KI5C8!X009sH0T2KI5C8!X009sH0T2KI5C8!X009sH0T2KI5C8!X009sH z0T2KI5C8!X009sH0T2KI5C8!X009sH0T2KI5C8!X009sH0T2KI5C8!X009sH0T2KI z5C8!X009sH0T2KI5C8!X009sH0T2KI5C8!X009sH0T2KI5C8!X009sH0T2KI5C8!X z009sH0T2KI5C8!X009sH0T2KI5C8!X009sH0T2KI5C8!X009sH0T2KI5C8!X009sH z0T2KI5C8!X009sH0T2KI5C8!X009sH0T2KI5C8!X009sH0T2KI5C8!X009sH0T2KI z5C8!X009sH0T2KI5C8!X009sH0T2KI5C8!X009sH0T2KI5C8!X009sH0T2KI5C8!X z009sH0T2KI5C8!X009sH0T2KI5C8!X009sH0T2KI5C8!X009sH0T2KI5C8!X009sH z0T2KI5C8!X009sH0T2KI5C8!X009sH0T2KI5C8!X009sH0T2KI5C8!X009sH0T2KI z5C8!X009sH0T2KI5C8!X009sH0T2KI5C8!X009sH0T2KI5C8!X009sH0T2KI5C8!X z009sH0T2KI5C8!X009sH0T2KI5C8!X009sH0T2KI5C8!X009sH0T2KI5C8!X009sH z0T2KI5C8!X009sH0T2KI5C8!X009sH0T2KI5C8!X009sH0T2KI5C8!X009sH0T2KI z5C8!X009sH0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2!H?xfB*=900@8p2!H?x zfB*=900@8p2!H?xfB*=900@8p2!H?xfB*=900@8p2!H?xfB*=900@8p2!H?xfB*=9 z00@8p2!H?xfB*=900@8p2!H?xfB*=900@8p2!H?xfB*=900@8p2!H?xfB*=900@8p z2!H?xfB*=900@8p2!H?xfB*=900@At;_cOGE zDrHdeZN-qkM7;9#FEt0s<#XZ(#Ro%YmQqbXS7Kp?z{R9d3WH0Dg&6`DlSU~FE+rOb z2wY4Wr7*aZSePMjF=>>-;8J2?hUN{Im-_k^>7V*OLTaC&JAhA6=ugGh!gpcNDtg8m ztV}-w8lVBcq1piY0{Q~_0{Vj43qa#Mr-Azmb!~jEIEV-7-sN-RkHj~035;v?BhZ2d z+J@f-&{NEF(JvYe^Vksv0T2KI5STXv^wld%^P25EjlWxbv-phohmX&uRTc@w>&3lGdaEYcN4O(LDmaVRml_-jM$V@t?Xa%#!En`Jz(&-YdRD=aD7thdnrec)NHmxF5NP-i7*k@%P2g={)i&(&}Er64qd%??=#1&>Lp=hV%A(QR%#3o;%EN zCHwO Date: Thu, 4 Jun 2020 09:10:29 +0200 Subject: [PATCH 2/6] feat(skeleton-loader): add support for `bg-dark` and `bg-light` --- scss/styles/_skeleton-loader.scss | 77 +++++++++++++++++++++++++++++-- 1 file changed, 72 insertions(+), 5 deletions(-) diff --git a/scss/styles/_skeleton-loader.scss b/scss/styles/_skeleton-loader.scss index 7e02bb2..6f09a02 100644 --- a/scss/styles/_skeleton-loader.scss +++ b/scss/styles/_skeleton-loader.scss @@ -1,8 +1,19 @@ -$skeleton-loader-mask-color: $white; -$skeleton-loader-mask: escape-svg(str-replace(url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='768' height='332'%3E%3Cpath d='M0 0h768v332H0V0zm0 0h220v48H0V0zm0 64h308v96H0V64zm0 112h418v96H0v-96zM324 64h444v96H324V64zm110 112h304v96H434v-96zM0 288h188v44H0v-44zm204 0h154v44H204v-44z' fill='#{$skeleton-loader-mask-color}' fill-rule='evenodd' /%3E%3C/svg%3E"), "#", "%23")); -$skeleton-loader-mask-fill-pixel: escape-svg(str-replace(url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1' height='1'%3E%3Cpath fill='#{$skeleton-loader-mask-color}' d='M0 0h1v1H0z'/%3E%3C/svg%3E"), "#", "%23")); -$skeleton-loader-mask-table: escape-svg(str-replace(url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='768' height='180'%3E%3Cpath d='M0 0h768v180H0V0zm0 10h90v24H0V10zm0 45h70v24H0V55zm0 45h80v24H0v-24zm0 45h90v24H0v-24zM114 10h100v24H114V10zm0 45h120v24H114V55zm0 45h130v24H114v-24zm0 45h110v24H114v-24zM268 10h100v24H268V10zm0 45h80v24h-80V55zm0 45h100v24H268v-24zm0 45h110v24H268v-24zM402 10h90v24h-90V10zm0 45h70v24h-70V55zm0 45h80v24h-80v-24zm0 45h90v24h-90v-24zM516 10h90v24h-90V10zm0 45h110v24H516V55zm0 45h120v24H516v-24zm0 45h100v24H516v-24zm144 0h84v24h-84v-24zm0-45h74v24h-74v-24zm0-45h64v24h-64V55zm0-45h84v24h-84V10zM0 44h768v1H0v-1zm0 45h768v1H0v-1zm0 45h768v1H0v-1zm0 45h768v1H0v-1z' fill='#{$skeleton-loader-mask-color}' fill-rule='evenodd' /%3E%3C/svg%3E"), "#", "%23")); -$skeleton-loader-mask-list: escape-svg(str-replace(url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1' height='40'%3E%3Cpath fill='#{$skeleton-loader-mask-color}' d='M0 24h1v16H0z'/%3E%3C/svg%3E"), "#", "%23")); +$skeleton-loader-mask-color: $white !default; +$skeleton-loader-mask-color-dark: $dark !default; +$skeleton-loader-mask-color-light: $light !default; +$skeleton-loader-mask: escape-svg(str-replace(url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='768' height='332'%3E%3Cpath d='M0 0h768v332H0V0zm0 0h220v48H0V0zm0 64h308v96H0V64zm0 112h418v96H0v-96zM324 64h444v96H324V64zm110 112h304v96H434v-96zM0 288h188v44H0v-44zm204 0h154v44H204v-44z' fill='#{$skeleton-loader-mask-color}' fill-rule='evenodd' /%3E%3C/svg%3E"), "#", "%23")) !default; +$skeleton-loader-mask-dark: str-replace($skeleton-loader-mask, str-replace(#{'fill=\'' + $skeleton-loader-mask-color + '\''}, "#", "%23"), str-replace(#{'fill=\'' + $skeleton-loader-mask-color-dark + '\''}, "#", "%23")) !default; +$skeleton-loader-mask-light: str-replace($skeleton-loader-mask, str-replace(#{'fill=\'' + $skeleton-loader-mask-color + '\''}, "#", "%23"), str-replace(#{'fill=\'' + $skeleton-loader-mask-color-light + '\''}, "#", "%23")) !default; +$skeleton-loader-mask-fill-pixel: escape-svg(str-replace(url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1' height='1'%3E%3Cpath fill='#{$skeleton-loader-mask-color}' d='M0 0h1v1H0z'/%3E%3C/svg%3E"), "#", "%23")) !default; +$skeleton-loader-mask-fill-pixel-dark: str-replace($skeleton-loader-mask-fill-pixel, str-replace(#{'fill=\'' + $skeleton-loader-mask-color + '\''}, "#", "%23"), str-replace(#{'fill=\'' + $skeleton-loader-mask-color-dark + '\''}, "#", "%23")) !default; +$skeleton-loader-mask-fill-pixel-light: str-replace($skeleton-loader-mask-fill-pixel, str-replace(#{'fill=\'' + $skeleton-loader-mask-color + '\''}, "#", "%23"), str-replace(#{'fill=\'' + $skeleton-loader-mask-color-light + '\''}, "#", "%23")) !default; +$skeleton-loader-mask-table: escape-svg(str-replace(url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='768' height='180'%3E%3Cpath d='M0 0h768v180H0V0zm0 10h90v24H0V10zm0 45h70v24H0V55zm0 45h80v24H0v-24zm0 45h90v24H0v-24zM114 10h100v24H114V10zm0 45h120v24H114V55zm0 45h130v24H114v-24zm0 45h110v24H114v-24zM268 10h100v24H268V10zm0 45h80v24h-80V55zm0 45h100v24H268v-24zm0 45h110v24H268v-24zM402 10h90v24h-90V10zm0 45h70v24h-70V55zm0 45h80v24h-80v-24zm0 45h90v24h-90v-24zM516 10h90v24h-90V10zm0 45h110v24H516V55zm0 45h120v24H516v-24zm0 45h100v24H516v-24zm144 0h84v24h-84v-24zm0-45h74v24h-74v-24zm0-45h64v24h-64V55zm0-45h84v24h-84V10zM0 44h768v1H0v-1zm0 45h768v1H0v-1zm0 45h768v1H0v-1zm0 45h768v1H0v-1z' fill='#{$skeleton-loader-mask-color}' fill-rule='evenodd' /%3E%3C/svg%3E"), "#", "%23")) !default; +$skeleton-loader-mask-table-dark: str-replace($skeleton-loader-mask-table, str-replace(#{'fill=\'' + $skeleton-loader-mask-color + '\''}, "#", "%23"), str-replace(#{'fill=\'' + $skeleton-loader-mask-color-dark + '\''}, "#", "%23")) !default; +$skeleton-loader-mask-table-light: str-replace($skeleton-loader-mask-table, str-replace(#{'fill=\'' + $skeleton-loader-mask-color + '\''}, "#", "%23"), str-replace(#{'fill=\'' + $skeleton-loader-mask-color-light + '\''}, "#", "%23")) !default; +$skeleton-loader-mask-list: escape-svg(str-replace(url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1' height='40'%3E%3Cpath fill='#{$skeleton-loader-mask-color}' d='M0 24h1v16H0z'/%3E%3C/svg%3E"), "#", "%23")) !default; +$skeleton-loader-mask-list-dark: str-replace($skeleton-loader-mask-list, str-replace(#{'fill=\'' + $skeleton-loader-mask-color + '\''}, "#", "%23"), str-replace(#{'fill=\'' + $skeleton-loader-mask-color-dark + '\''}, "#", "%23")) !default; +$skeleton-loader-mask-list-light: str-replace($skeleton-loader-mask-list, str-replace(#{'fill=\'' + $skeleton-loader-mask-color + '\''}, "#", "%23"), str-replace(#{'fill=\'' + $skeleton-loader-mask-color-light + '\''}, "#", "%23")) !default; + .skeleton-loader { position: relative; overflow: hidden; @@ -74,6 +85,62 @@ $skeleton-loader-mask-list: escape-svg(str-replace(url("data:image/svg+xml,%3Csv background: none; } } + &.bg-dark { + &::before { + background-size: 768px 332px, 100% 100%; + background-repeat:no-repeat; + background-image: $skeleton-loader-mask-dark, $skeleton-loader-mask-fill-pixel-dark; + background-position-x: 0, 768px; + } + &::after { + background: linear-gradient(80deg, lighten($dark, 5%) 10%, lighten($dark, 10%) 80%, transparent 90%), lighten($dark, 5%); + background-size: 50% 100%; + background-repeat: no-repeat; + } + &.skeleton-loader-list { + &::before { + background-size: 1px 40px; + background-repeat: repeat; + background-image: $skeleton-loader-mask-list-dark; + } + } + &.skeleton-loader-table { + &::before { + background-size: 768px 180px; + background-position-y: 1px; + background-repeat: repeat; + background-image: $skeleton-loader-mask-table-dark; + } + } + } + &.bg-light { + &::before { + background-size: 768px 332px, 100% 100%; + background-repeat:no-repeat; + background-image: $skeleton-loader-mask-light, $skeleton-loader-mask-fill-pixel-light; + background-position-x: 0, 768px; + } + &::after { + background: linear-gradient(80deg, darken($light, 5%) 10%, darken($light, 10%) 80%, transparent 90%), darken($light, 5%); + background-size: 50% 100%; + background-repeat: no-repeat; + } + &.skeleton-loader-list { + &::before { + background-size: 1px 40px; + background-repeat: repeat; + background-image: $skeleton-loader-mask-list-light; + } + } + &.skeleton-loader-table { + &::before { + background-size: 768px 180px; + background-position-y: 1px; + background-repeat: repeat; + background-image: $skeleton-loader-mask-table-light; + } + } + } } @include media-breakpoint-up(sm) { .skeleton-loader { From ea1e6fc114486b41f5d6070d0e561e28fc2b38e5 Mon Sep 17 00:00:00 2001 From: Robert Hjalmers Date: Thu, 4 Jun 2020 09:10:59 +0200 Subject: [PATCH 3/6] docs(skeleton-loader): add more examples --- .../skeleton-loader.component.html | 40 ++++++++++++++----- 1 file changed, 29 insertions(+), 11 deletions(-) diff --git a/src/example/components/skeleton-loader/skeleton-loader.component.html b/src/example/components/skeleton-loader/skeleton-loader.component.html index a70ddd7..01b9d81 100644 --- a/src/example/components/skeleton-loader/skeleton-loader.component.html +++ b/src/example/components/skeleton-loader/skeleton-loader.component.html @@ -7,6 +7,7 @@

When and how to use them?

We currently have templates for the following:
  • Content (default)
  • +
  • List group
  • Single field
  • Table
@@ -114,6 +115,23 @@
With delay
+
+

Custom fill background

+
+ By default the skeleton loader uses white as fill color (for use against white backgrounds) but it's also possible to use skeleton loaders against dark (.bg-dark) and light (.bg-light). All skeleton loaders support custom fill colors. +
+
+
With dark background
+

Just add bg-dark to the skeleton loader element.

+
+
+
+
With light background
+

Just add bg-light to the skeleton loader element.

+
+ +
+

More examples

@@ -215,39 +233,39 @@
Form with fields and button

Example with cards

-
+
-
+
-
+
-
+
-
+
-
-
-
+
+
+
-
-
-
+
+
+
From 47498d1f02eb259bbcc33483a20841396b00db2d Mon Sep 17 00:00:00 2001 From: Robert Hjalmers Date: Thu, 4 Jun 2020 11:07:22 +0200 Subject: [PATCH 4/6] fix(spinner): adjust sizes and animation --- scss/styles/_spinners.scss | 145 ++++++++++++++++++------------------- 1 file changed, 72 insertions(+), 73 deletions(-) diff --git a/scss/styles/_spinners.scss b/scss/styles/_spinners.scss index e98ac8f..1997348 100644 --- a/scss/styles/_spinners.scss +++ b/scss/styles/_spinners.scss @@ -1,7 +1,7 @@ -$spinner-sm-size: 1rem; -$spinner-size: 2rem; -$spinner-md-size: 4rem; -$spinner-lg-size: 6rem; +$spinner-xs-size: 1rem !default; +$spinner-sm-size: 2rem !default; +$spinner-md-size: 4rem !default; +$spinner-lg-size: 6rem !default; .spinner, .spinner:before, @@ -10,69 +10,71 @@ $spinner-lg-size: 6rem; } .spinner { color: $green; + background: $white; position: relative; - width: $spinner-size; - height: $spinner-size; - box-shadow: inset 0 0 0 3.5px; + width: $spinner-md-size; + height: $spinner-md-size; + box-shadow: inset 0 0 0 5px; transform: translateZ(0); animation: rotate-circle 1s infinite linear; &:after { - width: $spinner-size/2 + 0.2rem; //5.2em; - height: $spinner-size + 0.2rem; // 10.2em; + width: $spinner-md-size/2; //5.2em; + height: $spinner-md-size; // 10.2em; background: $white; - border-radius: 0 $spinner-size + 0.2rem $spinner-size + 0.2rem 0;//0 10.2em 10.2em 0; - top: -0.1rem; - left: $spinner-size/2 + 0.1rem;//5.1em; - transform-origin: 0 $spinner-size/2 + 0.1rem;//0 5.1em; + border-radius: 0 $spinner-md-size $spinner-md-size 0;//0 10.2em 10.2em 0; + //top: -0.1rem; + left: $spinner-md-size/2;//5.1em; + transform-origin: 0 $spinner-md-size/2;//0 5.1em; animation: rotate-circle 2s infinite ease; } &:before { - width: $spinner-size/2 + 0.2rem; //5.2em; - height: $spinner-size + 0.2rem; //10.2em; - background: $white; - border-radius: $spinner-size + 0.2rem 0 0 $spinner-size + 0.2rem; // 10.2em 0 0 10.2em; - top: -0.1rem; - left: -0.1rem; - transform-origin: $spinner-size/2 + 0.2rem $spinner-size/2 + 0.1rem; // 5.2em 5.1em; + width: $spinner-md-size/2; //5.2em; + height: $spinner-md-size; //10.2em; + background: $spinner-fill-color; + border-radius: $spinner-md-size 0 0 $spinner-md-size; // 10.2em 0 0 10.2em; + //top: -0.1rem; + //left: -0.1rem; + left: 0; + transform-origin: $spinner-md-size/2 $spinner-md-size/2; // 5.2em 5.1em; animation: rotate-circle 2s infinite ease 1.5s; } } -.spinner.spinner-sm, .btn .spinner { - width: $spinner-sm-size; - height: $spinner-sm-size; +.spinner.spinner-xs, .btn .spinner { + width: $spinner-xs-size; + height: $spinner-xs-size; box-shadow: inset 0 0 0 2px; &:before { - width: $spinner-sm-size/2 + 0.2rem; - height: $spinner-sm-size + 0.2rem; - border-radius: $spinner-sm-size + 0.2rem 0 0 $spinner-sm-size + 0.2rem; - transform-origin: $spinner-sm-size/2 + 0.2rem $spinner-sm-size/2 + 0.1rem; + width: $spinner-xs-size/2; + height: $spinner-xs-size; + border-radius: $spinner-xs-size 0 0 $spinner-xs-size; + transform-origin: $spinner-xs-size/2 $spinner-xs-size/2; } &:after { - width: $spinner-sm-size/2 + 0.2rem; //5.2em; - height: $spinner-sm-size + 0.2rem; // 10.2em; - border-radius: 0 $spinner-sm-size + 0.2rem $spinner-sm-size + 0.2rem 0;//0 10.2em 10.2em 0; - left: $spinner-sm-size/2 + 0.1rem;//5.1em; - transform-origin: 0 $spinner-sm-size/2 + 0.1rem;//0 5.1em; + width: $spinner-xs-size/2; //5.2em; + height: $spinner-xs-size; // 10.2em; + border-radius: 0 $spinner-xs-size $spinner-xs-size 0;//0 10.2em 10.2em 0; + left: $spinner-xs-size/2;//5.1em; + transform-origin: 0 $spinner-xs-size/2;//0 5.1em; } } -.spinner.spinner-md { - width: $spinner-md-size; - height: $spinner-md-size; - box-shadow: inset 0 0 0 5px; +.spinner.spinner-sm { + width: $spinner-sm-size; + height: $spinner-sm-size; + box-shadow: inset 0 0 0 3.5px; &:before { - width: $spinner-md-size/2 + 0.2rem; - height: $spinner-md-size + 0.2rem; - border-radius: $spinner-md-size + 0.2rem 0 0 $spinner-md-size + 0.2rem; - transform-origin: $spinner-md-size/2 + 0.2rem $spinner-md-size/2 + 0.1rem; + width: $spinner-sm-size/2; + height: $spinner-sm-size; + border-radius: $spinner-sm-size 0 0 $spinner-sm-size; + transform-origin: $spinner-sm-size/2 $spinner-sm-size/2; } &:after { - width: $spinner-md-size/2 + 0.2rem; //5.2em; - height: $spinner-md-size + 0.2rem; // 10.2em; - border-radius: 0 $spinner-md-size + 0.2rem $spinner-md-size + 0.2rem 0;//0 10.2em 10.2em 0; - left: $spinner-md-size/2 + 0.1rem;//5.1em; - transform-origin: 0 $spinner-md-size/2 + 0.1rem;//0 5.1em; + width: $spinner-sm-size/2; //5.2em; + height: $spinner-sm-size; // 10.2em; + border-radius: 0 $spinner-sm-size $spinner-sm-size 0;//0 10.2em 10.2em 0; + left: $spinner-sm-size/2;//5.1em; + transform-origin: 0 $spinner-sm-size/2;//0 5.1em; } } @@ -81,43 +83,40 @@ $spinner-lg-size: 6rem; height: $spinner-lg-size; box-shadow: inset 0 0 0 7px; &:before { - width: $spinner-lg-size/2 + 0.2rem; - height: $spinner-lg-size + 0.2rem; - border-radius: $spinner-lg-size + 0.2rem 0 0 $spinner-lg-size + 0.2rem; - transform-origin: $spinner-lg-size/2 + 0.2rem $spinner-lg-size/2 + 0.1rem; + width: $spinner-lg-size/2; + height: $spinner-lg-size; + border-radius: $spinner-lg-size 0 0 $spinner-lg-size; + transform-origin: $spinner-lg-size/2 $spinner-lg-size/2; } &:after { - width: $spinner-lg-size/2 + 0.2rem; //5.2em; - height: $spinner-lg-size + 0.2rem; // 10.2em; - border-radius: 0 $spinner-lg-size + 0.2rem $spinner-lg-size + 0.2rem 0;//0 10.2em 10.2em 0; - left: $spinner-lg-size/2 + 0.1rem;//5.1em; - transform-origin: 0 $spinner-lg-size/2 + 0.1rem;//0 5.1em; + width: $spinner-lg-size/2; //5.2em; + height: $spinner-lg-size; // 10.2em; + border-radius: 0 $spinner-lg-size $spinner-lg-size 0;//0 10.2em 10.2em 0; + left: $spinner-lg-size/2;//5.1em; + transform-origin: 0 $spinner-lg-size/2;//0 5.1em; } } - -.spinner:before, -.spinner:after { +.spinner::before, +.spinner::after { position: absolute; content: ''; + box-shadow: $white 0 0 0 1px; } .spinner.light { - &:before, - &:after { - background: $light; - } + background: $light } .btn { .spinner { + background: $btn-disabled-color; //width: 1rem; //height: 1rem; color: $white; display: inline-block; vertical-align: -3px; - &:before, - &:after { - background: $btn-disabled-color; + &::before, &::after { + box-shadow: $btn-disabled-color 0 0 0 1px; } } &[class*=" btn-outline-"] { @@ -126,9 +125,9 @@ $spinner-lg-size: 6rem; } .spinner { color: $btn-disabled-color; - &:before, - &:after { - background: $gray-100; + background: $white; + &::before, &::after { + box-shadow: $white 0 0 0 1px; } } } @@ -138,9 +137,9 @@ $spinner-lg-size: 6rem; } .spinner { color: $btn-disabled-color; - &:before, - &:after { - background: $white; + background: $white; + &::before, &::after { + box-shadow: $white 0 0 0 1px; } } } @@ -156,14 +155,14 @@ $spinner-lg-size: 6rem; } .spinner-sq { - width: $spinner-size; - height: $spinner-size; + width: $spinner-md-size; + height: $spinner-md-size; background-color: $green; -webkit-animation: sk-rotateplane 1.2s infinite ease-in-out; animation: sk-rotateplane 1.2s infinite ease-in-out; } -.spinner-sq.spinner-sm,.btn > .spinner-sq { +.spinner-sq.spinner-xs,.btn > .spinner-sq { width: 1rem; height: 1rem; } From 1a57ac6c51f2d59aa06a59bddb1f8de34463b09b Mon Sep 17 00:00:00 2001 From: Robert Hjalmers Date: Thu, 4 Jun 2020 11:08:23 +0200 Subject: [PATCH 5/6] feat(spinner): add support for different background colors closes #306 --- scss/styles/_spinners.scss | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/scss/styles/_spinners.scss b/scss/styles/_spinners.scss index 1997348..8b7f047 100644 --- a/scss/styles/_spinners.scss +++ b/scss/styles/_spinners.scss @@ -2,6 +2,7 @@ $spinner-xs-size: 1rem !default; $spinner-sm-size: 2rem !default; $spinner-md-size: 4rem !default; $spinner-lg-size: 6rem !default; +$spinner-fill-color: inherit !default; .spinner, .spinner:before, @@ -20,7 +21,7 @@ $spinner-lg-size: 6rem !default; &:after { width: $spinner-md-size/2; //5.2em; height: $spinner-md-size; // 10.2em; - background: $white; + background: $spinner-fill-color; border-radius: 0 $spinner-md-size $spinner-md-size 0;//0 10.2em 10.2em 0; //top: -0.1rem; left: $spinner-md-size/2;//5.1em; @@ -96,6 +97,15 @@ $spinner-lg-size: 6rem !default; transform-origin: 0 $spinner-lg-size/2;//0 5.1em; } } +.spinner { + @each $color, $value in $theme-colors { + &.bg-#{$color} { + &::before, &::after { + box-shadow: $value 0 0 0 1px; + } + } + } +} .spinner::before, .spinner::after { position: absolute; From 72496743e9272ed4880adcf2829f03d44288c66c Mon Sep 17 00:00:00 2001 From: Robert Hjalmers Date: Thu, 4 Jun 2020 11:08:44 +0200 Subject: [PATCH 6/6] docs(spinner): update examples --- .../spinners/spinners.component.html | 135 +++++++++++++++--- 1 file changed, 112 insertions(+), 23 deletions(-) diff --git a/src/example/components/spinners/spinners.component.html b/src/example/components/spinners/spinners.component.html index cb04470..c9c90f0 100644 --- a/src/example/components/spinners/spinners.component.html +++ b/src/example/components/spinners/spinners.component.html @@ -1,20 +1,20 @@

Spinners

-

Some experimental spinners

+

Some experimental spinners intended to be used on solid backgrounds.

-
+
Loading...
-
+
Loading...
-
+
Loading...
@@ -24,7 +24,7 @@

Spinners

+
+
+ Loading... +
+
+
+
+ Loading... +
+
+
+
+ Loading... +
+
+
+
+

And so on... spinners can be used on any solid background by adding a bg-* class either to the spinner element itself or to it's parent container. See available bg classes under the colors section.

+ +