_to-deprecate.scss 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. @mixin breakpoint($query:$feature $value $columns, $total-columns: $grid-columns) {
  2. @warn "The breakpoint() mixin was renamed to media() in Neat 1.0. Please update your project with the new syntax before the next version bump.";
  3. @if length($query) == 1 {
  4. @media screen and ($default-feature: nth($query, 1)) {
  5. $default-grid-columns: $grid-columns;
  6. $grid-columns: $total-columns;
  7. @content;
  8. $grid-columns: $default-grid-columns;
  9. }
  10. }
  11. @else if length($query) == 2 {
  12. @media screen and (nth($query, 1): nth($query, 2)) {
  13. $default-grid-columns: $grid-columns;
  14. $grid-columns: $total-columns;
  15. @content;
  16. $grid-columns: $default-grid-columns;
  17. }
  18. }
  19. @else if length($query) == 3 {
  20. @media screen and (nth($query, 1): nth($query, 2)) {
  21. $default-grid-columns: $grid-columns;
  22. $grid-columns: nth($query, 3);
  23. @content;
  24. $grid-columns: $default-grid-columns;
  25. }
  26. }
  27. @else if length($query) == 4 {
  28. @media screen and (nth($query, 1): nth($query, 2)) and (nth($query, 3): nth($query, 4)) {
  29. $default-grid-columns: $grid-columns;
  30. $grid-columns: $total-columns;
  31. @content;
  32. $grid-columns: $default-grid-columns;
  33. }
  34. }
  35. @else if length($query) == 5 {
  36. @media screen and (nth($query, 1): nth($query, 2)) and (nth($query, 3): nth($query, 4)) {
  37. $default-grid-columns: $grid-columns;
  38. $grid-columns: nth($query, 5);
  39. @content;
  40. $grid-columns: $default-grid-columns;
  41. }
  42. }
  43. @else {
  44. @warn "Wrong number of arguments for breakpoint(). Read the documentation for more details.";
  45. }
  46. }
  47. @mixin nth-omega($nth, $display: block, $direction: default) {
  48. @warn "The nth-omega() mixin is deprecated. Please use omega() instead.";
  49. @include omega($nth $display, $direction);
  50. }