【发布时间】:2019-08-17 22:10:15
【问题描述】:
我正在尝试在我的 Angular 应用程序中为媒体查询创建一些常见的断点。我正在使用scss。我到处重复这 3 行,我想改进它:
@media screen and (orientation: landscape) and (max-width: 959px),
screen and (orientation: portrait) and (max-width: 599px) {
@media screen and (orientation: landscape) and (max-width: 959px) {
@media screen and (orientation: portrait) and (max-width: 599px) {
我想创建一些变量来包含它,但我没有得到它,它应该是这样的:
$mobile = "screen and (orientation: landscape) and (max-width: 959px),
screen and (orientation: portrait) and (max-width: 599px)"
$landscape_mobile = "screen and (orientation: landscape) and (max-width: 959px)"
$portrait_mobile = "screen and (orientation: portrait) and (max-width: 599px)"
有可能吗?
【问题讨论】:
标签: css sass media-queries