暂无描述
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

_mixins.scss 1.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. //MEDIA QUERY MANAGER
  2. // 0 - 600: Phone
  3. // 600 - 900: Tablet portrait
  4. // 900 - 1200: Tablet landscape
  5. // 1200 - 1800: Normal styles
  6. // 1800+ : Big Desktop
  7. // 1em = 16px
  8. // The smaller device rules always should write below the bigger device rules
  9. // Fixing Order => Base + Typography >> General Layout + Grid >> Page Layout + Component
  10. @mixin respond($breakpoint) {
  11. @if($breakpoint=="phone") {
  12. @media only screen and (max-width: 575px) {
  13. @content;
  14. }
  15. }
  16. @if($breakpoint=="phone-land") {
  17. @media only screen and (max-width: 767px) {
  18. @content;
  19. }
  20. }
  21. @if($breakpoint=="tab-port") {
  22. @media only screen and (max-width: 991px) {
  23. @content;
  24. }
  25. }
  26. @if($breakpoint=="tab-land") {
  27. @media only screen and (max-width: 1199px) {
  28. @content;
  29. }
  30. }
  31. @if ($breakpoint=="desktop") {
  32. @media only screen and (min-width: 1200px) {
  33. @content;
  34. }
  35. }
  36. @if($breakpoint=="big-desktop") {
  37. @media only screen and (min-width: 1800px) {
  38. @content;
  39. }
  40. }
  41. }
  42. //don't use it untill you need this too much
  43. @mixin custommq($min: null, $max: null) {
  44. @if ($min !=null and $max !=null) {
  45. @media only screen and (min-width: $min) and (max-width: $max) {
  46. @content;
  47. }
  48. }
  49. @if ($min==null and $max !=null) {
  50. @media only screen and (max-width: $max) {
  51. @content;
  52. }
  53. }
  54. @if ($min !=null and $max==null) {
  55. @media only screen and (min-width: $min) {
  56. @content;
  57. }
  58. }
  59. }