diff --git a/docs/assets/scss/docs.scss b/docs/assets/scss/docs.scss index 293c7f0f..15fea18b 100644 --- a/docs/assets/scss/docs.scss +++ b/docs/assets/scss/docs.scss @@ -1,5 +1,7 @@ +@use "sass:color"; + $topbar-background: #2c3840; -$topbar-hover-color: lighten($topbar-background, 10%);// The CSS for the Foundation docs is stored in an external codebase: +$topbar-hover-color: color.adjust($topbar-background, $lightness: +10%, $space: hsl);// The CSS for the Foundation docs is stored in an external codebase: // https://github.com/zurb/foundation-docs // // You can test Sass changes locally by running these commands: @@ -29,7 +31,7 @@ $foundation-palette: ( @import 'course-callout'; $topbar-background: #2c3840; -$topbar-hover-color: lighten($topbar-background, 10%); +$topbar-hover-color: color.adjust($topbar-background, $lightness: +10%, $space: hsl); .dropdown.menu > li.is-dropdown-submenu-parent > a { padding-right: 1rem; @@ -69,7 +71,7 @@ $topbar-hover-color: lighten($topbar-background, 10%); background: $primary-color; &:hover { - background: darken($primary-color, 10%); + background: color.adjust($primary-color, $lightness: -10%, $space: hsl); } } diff --git a/scss/components/_button.scss b/scss/components/_button.scss index a96e79b8..79a1a3be 100755 --- a/scss/components/_button.scss +++ b/scss/components/_button.scss @@ -1,6 +1,8 @@ // Foundation for Emails by ZURB // zurb.com/ink/ // Licensed under MIT Open Source +@use "sass:color"; +@use "sass:map"; //// /// @group button @@ -71,13 +73,13 @@ table.button { a { font-family: $body-font-family; - font-size: map-get($button-font-size, default); + font-size: map.get($button-font-size, default); font-weight: $button-font-weight; color: $button-color; text-decoration: none; text-align: left; display: inline-block; - padding: map-get($button-padding, default); + padding: map.get($button-padding, default); border: 0 solid $button-background; border-radius: $button-radius; } @@ -118,11 +120,11 @@ table.button.tiny { table { td, a { - padding: map-get($button-padding, tiny); + padding: map.get($button-padding, tiny); } a { - font-size: map-get($button-font-size, tiny); + font-size: map.get($button-font-size, tiny); font-weight: normal; } } @@ -132,8 +134,8 @@ table.button.small { table { td, a { - padding: map-get($button-padding, small); - font-size: map-get($button-font-size, small); + padding: map.get($button-padding, small); + font-size: map.get($button-font-size, small); } } } @@ -141,8 +143,8 @@ table.button.small { table.button.large { table { a { - padding: map-get($button-padding, large); - font-size: map-get($button-font-size, large); + padding: map.get($button-padding, large); + font-size: map.get($button-font-size, large); } } } @@ -172,7 +174,7 @@ table.button:visited, table.button:active { table { td { - background: darken($button-background, 10%); + background: color.adjust($button-background, $lightness: -10%, $space: hsl); color: $button-color; } } @@ -183,7 +185,7 @@ table.button:visited, table.button:active { table { a { - border: 0 solid darken($button-background, 10%); + border: 0 solid color.adjust($button-background, $lightness: -10%, $space: hsl); } } } @@ -206,12 +208,12 @@ table.button.secondary { table.button.secondary:hover { table { td { - background: lighten($secondary-color, 10%); + background: color.adjust($secondary-color, $lightness: +10%, $space: hsl); color: $button-color; } a { - border: 0 solid lighten($secondary-color, 10%); + border: 0 solid color.adjust($secondary-color, $lightness: +10%, $space: hsl); } } } @@ -256,11 +258,11 @@ table.button.success { table.button.success:hover { table { td { - background: darken($success-color, 10%); + background: color.adjust($success-color, $lightness: -10%, $space: hsl); } a { - border: 0 solid darken($success-color, 10%); + border: 0 solid color.adjust($success-color, $lightness: -10%, $space: hsl); } } } @@ -281,11 +283,11 @@ table.button.alert { table.button.alert:hover { table { td { - background: darken($alert-color, 10%); + background: color.adjust($alert-color, $lightness: -10%, $space: hsl); } a { - border: 0 solid darken($alert-color, 10%); + border: 0 solid color.adjust($alert-color, $lightness: -10%, $space: hsl); } } } @@ -306,11 +308,11 @@ table.button.warning { table.button.warning:hover { table { td { - background: darken($warning-color, 10%); + background: color.adjust($warning-color, $lightness: -10%, $space: hsl); } a { - border: 0px solid darken($warning-color, 10%); + border: 0 solid color.adjust($warning-color, $lightness: -10%, $space: hsl); } } } diff --git a/scss/components/_callout.scss b/scss/components/_callout.scss index 19190980..243622f7 100644 --- a/scss/components/_callout.scss +++ b/scss/components/_callout.scss @@ -1,6 +1,7 @@ // Foundation for Emails by ZURB // zurb.com/ink/ // Licensed under MIT Open Source +@use "sass:color"; //// /// @group callout @@ -28,27 +29,27 @@ $callout-margin-bottom: $global-margin !default; /// Border around a callout. /// @type Border -$callout-border: 1px solid darken($callout-background, 20%) !default; +$callout-border: 1px solid color.adjust($callout-background, $lightness: -20%, $space: hsl) !default; /// Border around a callout with the `.primary` class. /// @type Border -$callout-border-primary: 1px solid darken($primary-color, 20%) !default; +$callout-border-primary: 1px solid color.adjust($primary-color, $lightness: -20%, $space: hsl) !default; /// Border around a callout with the `.secondary` class. /// @type Border -$callout-border-secondary: 1px solid darken($secondary-color, 20%) !default; +$callout-border-secondary: 1px solid color.adjust($secondary-color, $lightness: -20%, $space: hsl) !default; /// Border around a callout with the `.success` class. /// @type Border -$callout-border-success: 1px solid darken($success-color, 20%) !default; +$callout-border-success: 1px solid color.adjust($success-color, $lightness: -20%, $space: hsl) !default; /// Border around a callout with the `.warning` class. /// @type Border -$callout-border-warning: 1px solid darken($warning-color, 20%) !default; +$callout-border-warning: 1px solid color.adjust($warning-color, $lightness: -20%, $space: hsl) !default; /// Border around a callout with the `.alert` class. /// @type Border -$callout-border-alert: 1px solid darken($alert-color, 20%) !default; +$callout-border-alert: 1px solid color.adjust($alert-color, $lightness: -20%, $space: hsl) !default; table.callout { margin-bottom: $callout-margin-bottom; @@ -62,31 +63,31 @@ th.callout-inner { background: $callout-background; &.primary { - background: scale-color($primary-color, $lightness: $callout-background-fade); + background: color.scale($primary-color, $lightness: $callout-background-fade); border: $callout-border-primary; color: $black; } &.secondary { - background: scale-color($secondary-color, $lightness: $callout-background-fade); + background: color.scale($secondary-color, $lightness: $callout-background-fade); border: $callout-border-secondary; color: $black; } &.success { - background: scale-color($success-color, $lightness: $callout-background-fade); + background: color.scale($success-color, $lightness: $callout-background-fade); border: $callout-border-success; color: $black; } &.warning { - background: scale-color($warning-color, $lightness: $callout-background-fade); + background: color.scale($warning-color, $lightness: $callout-background-fade); border: $callout-border-warning; color: $black; } &.alert { - background: scale-color($alert-color, $lightness: $callout-background-fade); + background: color.scale($alert-color, $lightness: $callout-background-fade); border: $callout-border-alert; color: $black; } diff --git a/scss/components/_typography.scss b/scss/components/_typography.scss index cc57a178..0cc93b6c 100755 --- a/scss/components/_typography.scss +++ b/scss/components/_typography.scss @@ -2,6 +2,7 @@ // zurb.com/ink/ // Licensed under MIT Open Source @use "sass:math"; +@use "sass:color"; //// /// @group typography @@ -45,27 +46,27 @@ $header-font-weight: $global-font-weight !default; /// Font size of `