0.2.0 • Published 7 years ago

postcss-slope-calc v0.2.0

Weekly downloads
21
License
-
Repository
-
Last release
7 years ago

Slope Calc

Usage

Example:

.my-widget {
  padding: slope-calc(20px 320px, 60px 1440px, 60px 1441px);
}

Outputs:

.my-widget {
  padding: calc(3.57143vw + .53571rem);
}
@media only screen and (min-width: 90em) {
  .my-widget {
    padding: 3.75rem;
  }
}

Flags

Flags are an optional argument passed of at the end of the slope-calc function.

  • clip add a media query at the largest breakpoint that sets the property to a fixed value