Sha256: 85243055e7235716a394698e4d5cbf9000638e02a5d0f898febf0fd949d6d110

Contents?: true

Size: 411 Bytes

Versions: 31

Compression:

Stored size: 411 Bytes

Contents

// Convert to unitless rad
@use "sass:math";

@function unitless-rad ($angle){
  @if unitless($angle){
    @return $angle;
  }
  @else if unit($angle) == rad{
    @return math.div($angle, 1rad);
  }
  @else if unit($angle) == deg{
    @return deg-to-rad($angle, false);
  }
  @else if type-of($angle) != number or not unitless($angle){
    @warn "#{ $angle } is not a valid number.";

    @return $angle;
  }
}

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
decidim-admin-0.27.9 app/packs/stylesheets/decidim/admin/vendor/mathsass/helpers/_unitless-rad.scss
decidim-admin-0.27.8 app/packs/stylesheets/decidim/admin/vendor/mathsass/helpers/_unitless-rad.scss
decidim-admin-0.27.7 app/packs/stylesheets/decidim/admin/vendor/mathsass/helpers/_unitless-rad.scss
decidim-admin-0.27.6 app/packs/stylesheets/decidim/admin/vendor/mathsass/helpers/_unitless-rad.scss
decidim-admin-0.26.10 app/packs/stylesheets/decidim/admin/vendor/mathsass/helpers/_unitless-rad.scss
decidim-admin-0.26.9 app/packs/stylesheets/decidim/admin/vendor/mathsass/helpers/_unitless-rad.scss
decidim-admin-0.27.5 app/packs/stylesheets/decidim/admin/vendor/mathsass/helpers/_unitless-rad.scss
decidim-admin-0.26.8 app/packs/stylesheets/decidim/admin/vendor/mathsass/helpers/_unitless-rad.scss
decidim-admin-0.27.4 app/packs/stylesheets/decidim/admin/vendor/mathsass/helpers/_unitless-rad.scss
decidim-admin-0.27.3 app/packs/stylesheets/decidim/admin/vendor/mathsass/helpers/_unitless-rad.scss
decidim-admin-0.26.7 app/packs/stylesheets/decidim/admin/vendor/mathsass/helpers/_unitless-rad.scss
decidim-admin-0.26.5 app/packs/stylesheets/decidim/admin/vendor/mathsass/helpers/_unitless-rad.scss
decidim-admin-0.27.2 app/packs/stylesheets/decidim/admin/vendor/mathsass/helpers/_unitless-rad.scss
decidim-admin-0.27.1 app/packs/stylesheets/decidim/admin/vendor/mathsass/helpers/_unitless-rad.scss
decidim-admin-0.26.4 app/packs/stylesheets/decidim/admin/vendor/mathsass/helpers/_unitless-rad.scss
decidim-admin-0.27.0 app/packs/stylesheets/decidim/admin/vendor/mathsass/helpers/_unitless-rad.scss
decidim-admin-0.26.3 app/packs/stylesheets/decidim/admin/vendor/mathsass/helpers/_unitless-rad.scss
decidim-admin-0.27.0.rc2 app/packs/stylesheets/decidim/admin/vendor/mathsass/helpers/_unitless-rad.scss
decidim-admin-0.27.0.rc1 app/packs/stylesheets/decidim/admin/vendor/mathsass/helpers/_unitless-rad.scss
decidim-admin-0.26.2 app/packs/stylesheets/decidim/admin/vendor/mathsass/helpers/_unitless-rad.scss