teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

1

@mq(sp)についての追記

2019/07/28 07:08

投稿

kitty
kitty

スコア15

title CHANGED
File without changes
body CHANGED
@@ -44,4 +44,20 @@
44
44
  [https://hyper-text.org/archives/2016/05/css_calc_function.shtml](https://hyper-text.org/archives/2016/05/css_calc_function.shtml)
45
45
 
46
46
  答えをいただければとても助かります。
47
- すみませんが、よろしくお願いします。
47
+ すみませんが、よろしくお願いします。
48
+
49
+ 追記:
50
+ 上記で記載しておりませんでしたが、
51
+ 文中に出てくる@mq(sp)は、こちらの内容になります。
52
+
53
+ ```scss
54
+ $breakpoints: (
55
+ 'pc': 'screen and (min-width: 640px)',//pc
56
+ 'sp': 'screen and (max-width: 639px)',//sp
57
+ ) !default;
58
+ @mixin mq($breakpoint: pc) {
59
+ @media #{map-get($breakpoints, $breakpoint)} {
60
+ @content;
61
+ }
62
+ }
63
+ ```