Skip to content

Commit

Permalink
feat(shape): Minor doc updates
Browse files Browse the repository at this point in the history
  • Loading branch information
abhiomkar committed Sep 10, 2018
1 parent a544713 commit eb55fcf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/mdc-shape/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Styles for applying shapes for specific corners such as drawer looks like this:
@include mdc-shape-radius((0, $radius, $radius, 0), $rtl-reflexive: true);
```

Where, only top-right & bottom-right corners are customizable and it automatically flips based on RTL context when `$rtl-reflexive` is set to true.
Where, only top-right & bottom-right corners are customizable and it automatically flips radius values based on RTL context when `$rtl-reflexive` is set to true.

### Sass Mixins

Expand Down
8 changes: 7 additions & 1 deletion packages/mdc-shape/_functions.scss
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
// Examples:
//
// 1. mdc-shape-flip-radius((0, 4px, 4px, 0)) => 4px 0 0 4px
// 2. mdc-shape-flip-radius((0, 8px)) => 8px 0
//
@function mdc-shape-flip-radius($radius) {
@if length($radius) == 4 {
Expand All @@ -43,6 +44,7 @@

//
// Resolves the pill radius to appropriate radius value based on component height.
// Use this for fixed height components only.
//
// Examples:
//
Expand All @@ -69,10 +71,14 @@
}

//
// Returns $radius is one of the shape literal `large`, `medium` or `small` it returns their corresponding shape size.
// Returns $radius value of shape category - `large`, `medium` or `small`.
// Otherwise, it returns the $radius itself if valid.
// $radius can be a single value or list of 4.
//
// Examples:
//
// mdc-shape-prop-value(small) => 4px
//
@function mdc-shape-prop-value($radius) {
@if type-of($radius) == "list" {
@if length($radius) > 4 {
Expand Down

0 comments on commit eb55fcf

Please sign in to comment.