Skip to content

Commit

Permalink
Merge branch 'master' into hotfix/unstable-id-on-dropdown
Browse files Browse the repository at this point in the history
  • Loading branch information
asudoh authored Jan 6, 2020
2 parents 6994a05 + 6c1042e commit d0b4372
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 0 deletions.
10 changes: 10 additions & 0 deletions packages/components/docs/sass.md
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
```
Expand Down Expand Up @@ -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;
}
```
Expand Down
10 changes: 10 additions & 0 deletions packages/components/src/globals/scss/_typography.scss
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ $base-font-size: 16px !default;
/// @group global-typography
/// @deprecated (For v10) Use `carbon--rem()`
@function 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 / $base-font-size) * 1rem;
}

Expand All @@ -33,6 +38,11 @@ $base-font-size: 16px !default;
/// @group global-typography
/// @deprecated (For v10) Use `carbon--em()`
@function 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 / $base-font-size) * 1em;
}

Expand Down
10 changes: 10 additions & 0 deletions packages/elements/docs/sass.md
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
```
Expand Down Expand Up @@ -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;
}
```
Expand Down
10 changes: 10 additions & 0 deletions packages/layout/docs/sass.md
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
```
Expand Down Expand Up @@ -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;
}
```
Expand Down
10 changes: 10 additions & 0 deletions packages/layout/scss/_convert.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ $carbon--base-font-size: 16px !default;
/// @access public
/// @group @carbon/layout
@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;
}

Expand All @@ -26,5 +31,10 @@ $carbon--base-font-size: 16px !default;
/// @access public
/// @group @carbon/layout
@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;
}

0 comments on commit d0b4372

Please sign in to comment.