diff --git a/docs/pages/badge.md b/docs/pages/badge.md index 0ed430cd4f..0b321daace 100644 --- a/docs/pages/badge.md +++ b/docs/pages/badge.md @@ -47,7 +47,7 @@ Badges can be colored with the same classes used for buttons and other component An icon can be used in place of text. We're using the [Foundation icon font](http://zurb.com/playground/foundation-icon-fonts-3) here, but any icon fonts or image-based icons will work fine. ```html_example - + ``` diff --git a/docs/pages/button.md b/docs/pages/button.md index 9a081d1f16..1b5fc15dcc 100644 --- a/docs/pages/button.md +++ b/docs/pages/button.md @@ -53,11 +53,12 @@ Give a button additional meaning by adding a coloring class, or `.disabled` to c ```html_example -Secondary Color -Success Color -Alert Color -Warning Color -Disabled Button +Primary +Secondary +Success +Alert +Warning +Disabled ``` --- diff --git a/scss/_global.scss b/scss/_global.scss index 4ed320ab38..cb97530236 100644 --- a/scss/_global.scss +++ b/scss/_global.scss @@ -23,11 +23,11 @@ $global-lineheight: 1.5 !default; /// Colors used for buttons, callouts, links, etc. There must always be a color called `primary`. /// @type Map $foundation-palette: ( - primary: #2199e8, - secondary: #777, + primary: #1779ba, + secondary: #767676, success: #3adb76, warning: #ffae00, - alert: #ec5840, + alert: #cc4b37, ) !default; /// Color used for light gray UI items. diff --git a/scss/components/_accordion.scss b/scss/components/_accordion.scss index 3678f66075..e3ba3a9b1c 100644 --- a/scss/components/_accordion.scss +++ b/scss/components/_accordion.scss @@ -20,7 +20,7 @@ $accordion-title-font-size: rem-calc(12) !default; /// Default text color for items in a Menu. /// @type Color -$accordion-item-color: foreground($accordion-background, $primary-color) !default; +$accordion-item-color: $primary-color !default; /// Default background color on hover for items in a Menu. /// @type Color @@ -40,16 +40,18 @@ $accordion-content-border: 1px solid $light-gray !default; /// Default text color of tab content. /// @type Color -$accordion-content-color: foreground($accordion-content-background, $body-font-color) !default; +$accordion-content-color: $body-font-color !default; /// Default padding for tab content. /// @type Number | List $accordion-content-padding: 1rem !default; /// Adds styles for an accordion container. Apply this to the same element that gets `data-accordion`. -@mixin accordion-container { +@mixin accordion-container ( + $background: $accordion-background +) { margin-#{$global-left}: 0; - background: $accordion-background; + background: $background; list-style-type: none; } @@ -65,26 +67,32 @@ $accordion-content-padding: 1rem !default; } /// Adds styles for the title of an accordion item. Apply this to the link within an accordion item. -@mixin accordion-title { +@mixin accordion-title ( + $padding: $accordion-item-padding, + $font-size: $accordion-title-font-size, + $color: $accordion-item-color, + $border: $accordion-content-border, + $background-hover: $accordion-item-background-hover +) { position: relative; display: block; - padding: $accordion-item-padding; + padding: $padding; - border: $accordion-content-border; + border: $border; border-bottom: 0; - font-size: $accordion-title-font-size; + font-size: $font-size; line-height: 1; - color: $accordion-item-color; + color: $color; :last-child:not(.is-active) > & { - border-bottom: $accordion-content-border; + border-bottom: $border; border-radius: 0 0 $global-radius $global-radius; } &:hover, &:focus { - background-color: $accordion-item-background-hover; + background-color: $background-hover; } @if $accordion-plusminus { @@ -103,18 +111,23 @@ $accordion-content-padding: 1rem !default; } /// Adds styles for accordion content. Apply this to the content pane below an accordion item's title. -@mixin accordion-content { +@mixin accordion-content ( + $padding: $accordion-content-padding, + $border: $accordion-content-border, + $background: $accordion-content-background, + $color: $accordion-content-color +) { display: none; - padding: $accordion-content-padding; + padding: $padding; - border: $accordion-content-border; + border: $border; border-bottom: 0; - background-color: $accordion-content-background; + background-color: $background; - color: $accordion-content-color; + color: $color; :last-child > &:last-child { - border-bottom: $accordion-content-border; + border-bottom: $border; } } diff --git a/scss/components/_badge.scss b/scss/components/_badge.scss index 487f0d7696..768f649f24 100644 --- a/scss/components/_badge.scss +++ b/scss/components/_badge.scss @@ -12,7 +12,11 @@ $badge-background: $primary-color !default; /// Default text color for badges. /// @type Color -$badge-color: foreground($badge-background) !default; +$badge-color: $white !default; + +/// Alternate text color for badges. +/// @type Color +$badge-color-alt: $black !default; /// Default padding inside badges. /// @type Number @@ -49,7 +53,7 @@ $badge-font-size: 0.6rem !default; @if $name != primary { &.#{$name} { background: $color; - color: foreground($color); + color: color-pick-contrast($color, ($badge-color, $badge-color-alt)); } } } diff --git a/scss/components/_button.scss b/scss/components/_button.scss index ecb0d34555..01686a6efb 100644 --- a/scss/components/_button.scss +++ b/scss/components/_button.scss @@ -30,7 +30,7 @@ $button-background-hover: scale-color($button-background, $lightness: -15%) !def /// @type List $button-color: $white !default; -/// Font color for buttons, if the background is light. +/// Alternative font color for buttons. /// @type List $button-color-alt: $black !default; @@ -114,7 +114,7 @@ $button-transition: background-color 0.25s ease-out, color 0.25s ease-out !defau $background-hover-lightness: $button-background-hover-lightness ) { @if $color == auto { - $color: foreground($background, $button-color-alt, $button-color); + $color: color-pick-contrast($background, ($button-color, $button-color-alt)); } @if $background-hover == auto { diff --git a/scss/components/_label.scss b/scss/components/_label.scss index 28bbc0ba21..5f26e91f47 100644 --- a/scss/components/_label.scss +++ b/scss/components/_label.scss @@ -12,7 +12,11 @@ $label-background: $primary-color !default; /// Default text color for labels. /// @type Color -$label-color: foreground($label-background) !default; +$label-color: $white !default; + +/// Alternate text color for labels. +/// @type Color +$label-color-alt: $black !default; /// Default font size for labels. /// @type Number @@ -50,7 +54,7 @@ $label-radius: $global-radius !default; @if $name != primary { &.#{$name} { background: $color; - color: foreground($color); + color: color-pick-contrast($color, ($label-color, $label-color-alt)); } } } diff --git a/scss/components/_orbit.scss b/scss/components/_orbit.scss index 1ff7001860..9b43fcdd45 100644 --- a/scss/components/_orbit.scss +++ b/scss/components/_orbit.scss @@ -96,7 +96,7 @@ $orbit-control-zindex: 10 !default; padding: $orbit-caption-padding; background-color: $orbit-caption-background; - color: foreground($orbit-caption-background); + color: color-pick-contrast($orbit-caption-background); } /// Adds base styles for the next/previous buttons in an Orbit slider. These styles are shared between the `.orbit-next` and `.orbit-previous` classes in the default CSS. diff --git a/scss/components/_pagination.scss b/scss/components/_pagination.scss index 288041f708..7b18a3136d 100644 --- a/scss/components/_pagination.scss +++ b/scss/components/_pagination.scss @@ -40,7 +40,7 @@ $pagination-item-background-current: $primary-color !default; /// Text color of the pagination item for the current page. /// @type Color -$pagination-item-color-current: foreground($pagination-item-background-current) !default; +$pagination-item-color-current: $white !default; /// Text color of a disabled pagination item. /// @type Color @@ -66,16 +66,24 @@ $pagination-mobile-current-item: false !default; $pagination-arrows: true !default; /// Adds styles for a pagination container. Apply this to a `