[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/media/vendor/bootstrap/scss/mixins/ -> _border-radius.scss (source)

   1  // stylelint-disable property-disallowed-list
   2  // Single side border-radius
   3  
   4  // Helper function to replace negative values with 0
   5  @function valid-radius($radius) {
   6    $return: ();
   7    @each $value in $radius {
   8      @if type-of($value) == number {
   9        $return: append($return, max($value, 0));
  10      } @else {
  11        $return: append($return, $value);
  12      }
  13    }
  14    @return $return;
  15  }
  16  
  17  // scss-docs-start border-radius-mixins
  18  @mixin border-radius($radius: $border-radius, $fallback-border-radius: false) {
  19    @if $enable-rounded {
  20      border-radius: valid-radius($radius);
  21    }
  22    @else if $fallback-border-radius != false {
  23      border-radius: $fallback-border-radius;
  24    }
  25  }
  26  
  27  @mixin border-top-radius($radius: $border-radius) {
  28    @if $enable-rounded {
  29      border-top-left-radius: valid-radius($radius);
  30      border-top-right-radius: valid-radius($radius);
  31    }
  32  }
  33  
  34  @mixin border-end-radius($radius: $border-radius) {
  35    @if $enable-rounded {
  36      border-top-right-radius: valid-radius($radius);
  37      border-bottom-right-radius: valid-radius($radius);
  38    }
  39  }
  40  
  41  @mixin border-bottom-radius($radius: $border-radius) {
  42    @if $enable-rounded {
  43      border-bottom-right-radius: valid-radius($radius);
  44      border-bottom-left-radius: valid-radius($radius);
  45    }
  46  }
  47  
  48  @mixin border-start-radius($radius: $border-radius) {
  49    @if $enable-rounded {
  50      border-top-left-radius: valid-radius($radius);
  51      border-bottom-left-radius: valid-radius($radius);
  52    }
  53  }
  54  
  55  @mixin border-top-start-radius($radius: $border-radius) {
  56    @if $enable-rounded {
  57      border-top-left-radius: valid-radius($radius);
  58    }
  59  }
  60  
  61  @mixin border-top-end-radius($radius: $border-radius) {
  62    @if $enable-rounded {
  63      border-top-right-radius: valid-radius($radius);
  64    }
  65  }
  66  
  67  @mixin border-bottom-end-radius($radius: $border-radius) {
  68    @if $enable-rounded {
  69      border-bottom-right-radius: valid-radius($radius);
  70    }
  71  }
  72  
  73  @mixin border-bottom-start-radius($radius: $border-radius) {
  74    @if $enable-rounded {
  75      border-bottom-left-radius: valid-radius($radius);
  76    }
  77  }
  78  // scss-docs-end border-radius-mixins


Generated: Wed Sep 7 05:41:13 2022 Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer