From 90feb07751cfef9d0e33fb1cfe18fbe333ed5cf9 Mon Sep 17 00:00:00 2001 From: carbon-bot Date: Mon, 23 Dec 2019 22:40:37 +0000 Subject: [PATCH] chore(project): sync generated files --- packages/components/docs/sass.md | 10 ++++++++++ packages/elements/docs/sass.md | 10 ++++++++++ packages/layout/docs/sass.md | 10 ++++++++++ 3 files changed, 30 insertions(+) diff --git a/packages/components/docs/sass.md b/packages/components/docs/sass.md index e3a31a81d2cd..767c399c5729 100644 --- a/packages/components/docs/sass.md +++ b/packages/components/docs/sass.md @@ -2550,6 +2550,11 @@ Convert a given px unit to a rem unit ```scss @function carbon--rem($px) { + @if unit($px) != 'px' { + // TODO: update to @error in v11 + @warn "Expected argument $px to be of type `px`, instead received: `#{unit($px)}`"; + } + @return ($px / $carbon--base-font-size) * 1rem; } ``` @@ -2579,6 +2584,11 @@ Convert a given px unit to a em unit ```scss @function carbon--em($px) { + @if unit($px) != 'px' { + // TODO: update to @error in v11 + @warn "Expected argument $px to be of type `px`, instead received: `#{unit($px)}`"; + } + @return ($px / $carbon--base-font-size) * 1em; } ``` diff --git a/packages/elements/docs/sass.md b/packages/elements/docs/sass.md index 11c79e41efa3..aae30c75a745 100644 --- a/packages/elements/docs/sass.md +++ b/packages/elements/docs/sass.md @@ -2326,6 +2326,11 @@ Convert a given px unit to a rem unit ```scss @function carbon--rem($px) { + @if unit($px) != 'px' { + // TODO: update to @error in v11 + @warn "Expected argument $px to be of type `px`, instead received: `#{unit($px)}`"; + } + @return ($px / $carbon--base-font-size) * 1rem; } ``` @@ -2354,6 +2359,11 @@ Convert a given px unit to a em unit ```scss @function carbon--em($px) { + @if unit($px) != 'px' { + // TODO: update to @error in v11 + @warn "Expected argument $px to be of type `px`, instead received: `#{unit($px)}`"; + } + @return ($px / $carbon--base-font-size) * 1em; } ``` diff --git a/packages/layout/docs/sass.md b/packages/layout/docs/sass.md index 68fa9d47bfc1..79e92eae719d 100644 --- a/packages/layout/docs/sass.md +++ b/packages/layout/docs/sass.md @@ -733,6 +733,11 @@ Convert a given px unit to a rem unit ```scss @function carbon--rem($px) { + @if unit($px) != 'px' { + // TODO: update to @error in v11 + @warn "Expected argument $px to be of type `px`, instead received: `#{unit($px)}`"; + } + @return ($px / $carbon--base-font-size) * 1rem; } ``` @@ -761,6 +766,11 @@ Convert a given px unit to a em unit ```scss @function carbon--em($px) { + @if unit($px) != 'px' { + // TODO: update to @error in v11 + @warn "Expected argument $px to be of type `px`, instead received: `#{unit($px)}`"; + } + @return ($px / $carbon--base-font-size) * 1em; } ```