border.scss 850 B

1234567891011121314151617181920212223242526272829303132
  1. /**
  2. * Creates a border on an element.
  3. * If any of the parameters is specified as a list, or if any parameter is null,
  4. * border-style, border-width, and border-color will be specified as separate properties,
  5. * otherwise all will be collapsed into a single "border" property.
  6. *
  7. * @param {number/list} $width
  8. * The border-width
  9. *
  10. * @param {string/list} $style
  11. * The border-style
  12. *
  13. * @param {color/list} $color
  14. * The border-color
  15. *
  16. * @member Global_CSS
  17. * @private
  18. */
  19. @mixin border(
  20. $width: null,
  21. $style: null,
  22. $color: null
  23. ) {
  24. @if $width != null and $style != null and $color != null and
  25. length($width) == 1 and length($style) == 1 and length($color) == 1 {
  26. border: $width $style $color;
  27. } @else {
  28. border-width: $width;
  29. border-style: $style;
  30. border-color: $color;
  31. }
  32. }