diff --git a/docs/content/docs/components/progress.md b/docs/content/docs/components/progress.md index e12961d..0045c3d 100644 --- a/docs/content/docs/components/progress.md +++ b/docs/content/docs/components/progress.md @@ -5,25 +5,25 @@ description: PaperCSS Progress Bars Progress components are built with two HTML elements: * A `.progress` wrapper element. -* A `.progress-bar` element to show the progress so far. +* A `.bar` element to show the progress so far. ### Basic usage
-
+
-
+
-
+
-
+
-
+
@@ -32,45 +32,45 @@ Progress components are built with two HTML elements: ```html
-
+
-
+
-
+
-
+
-
+
``` -Note how we can specify the width using `.progress-50`, `.progress-75`, etc. The default progress bar width is 0%. +Note how we can specify the width using `.w-50`, `.w-75`, etc. If a width class is not provided then 0% is used as default. ### Backgrounds
-
+
-
+
-
+
-
+
-
+
-
+
@@ -79,22 +79,22 @@ Note how we can specify the width using `.progress-50`, `.progress-75`, etc. The ```html
-
+
-
+
-
+
-
+
-
+
-
+
``` @@ -103,22 +103,22 @@ Note how we can specify the width using `.progress-50`, `.progress-75`, etc. The
-
25%
+
25%
-
40%
+
40%
-
55%
+
55%
-
70%
+
70%
-
85%
+
85%
-
100%
+
100%
@@ -127,22 +127,22 @@ Note how we can specify the width using `.progress-50`, `.progress-75`, etc. The ```html
-
25%
+
25%
-
40%
+
40%
-
55%
+
55%
-
70%
+
70%
-
85%
+
85%
-
100%
+
100%
``` @@ -151,22 +151,22 @@ Note how we can specify the width using `.progress-50`, `.progress-75`, etc. The
-
+
-
+
-
+
-
+
-
+
-
+
@@ -175,22 +175,22 @@ Note how we can specify the width using `.progress-50`, `.progress-75`, etc. The ```html
-
+
-
+
-
+
-
+
-
+
-
+
``` diff --git a/src/components/_progress.scss b/src/components/_progress.scss index 2f3a0dd..d3562d9 100644 --- a/src/components/_progress.scss +++ b/src/components/_progress.scss @@ -1,17 +1,12 @@ .progress { @include border-style(5); border: 2px solid $primary; - box-shadow: 2px 8px 4px -6px hsla(0, 0%, 0%, 0.3); + box-shadow: 2px 8px 4px -6px hsla(0%, 0%, 0%, 0.3); height: 1.2rem; overflow: hidden; width: 100%; - @mixin striped-background($base-color) { - $color-dark: darken($base-color, 10%); - background: repeating-linear-gradient(45deg, $base-color, $base-color 0.25rem, $color-dark 0.25rem, $color-dark 0.5rem); - } - - .progress-bar { + .bar { @include border-style(5); @include transition; background-color: $primary-light; @@ -24,29 +19,34 @@ text-align: center; width: 0%; - &.progress-striped { + @mixin striped-background($base-color) { + $color-dark: darken($base-color, 10%); + background: repeating-linear-gradient(45deg, $base-color, $base-color 0.25rem, $color-dark 0.25rem, $color-dark 0.5rem); + } + + &.striped { @include striped-background($primary-light); } - } - @each $colorName, $color, $color-light in $colors { - .progress-#{$colorName} { - background-color: $color-light; - - &.progress-striped { - @include striped-background($color-light); + @each $colorName, $color, $color-light in $colors { + &.#{$colorName} { + background-color: $color-light; + + &.striped { + @include striped-background($color-light); + } } } - } - @for $i from 0 through 100 { - .progress-#{$i} { - width: $i + %; + @for $i from 0 through 100 { + &.w-#{$i} { + width: $i + %; + } + } + + &.w-0, + &.w-100 { + border-right: 0; } } - - .progress-0, - .progress-100 { - border-right: 0; - } }