【问题标题】:Magento 2 _theme.less media queriesMagento 2 _theme.less 媒体查询
【发布时间】:2016-04-19 17:14:10
【问题描述】:

向 _theme.less 添加样式是否有任何技巧,因此它们仅在已处理的样式-m.css 或样式-l.css 中

通常,来自 _theme.less 的样式会在两者中处理。

【问题讨论】:

    标签: magento less themes magento2 magento-2.0


    【解决方案1】:

    是的,代码包含在 & when (@media-common =true) { ... } 只会添加一次

    【讨论】:

      【解决方案2】:

      根据我的理解,styles-m.css 将同时具有桌面和移动样式,而 styles-l.css 将仅具有桌面样式。我已经分享了一个与您相关的问题的链接,请参阅link

      【讨论】:

      • 虽然这在理论上可以回答这个问题,it would be preferable 在此处包含答案的基本部分,并提供链接以供参考。有关如何编写更好“基于链接”的答案的说明,请参阅here。谢谢!
      • @GhostCat 没关系,但它会让我处于复制另一个帖子中已经存在的答案的位置。在stackoverflow上也避免了这种情况。但我确实同意基于链接的答案:)。
      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2022-01-25
      • 1970-01-01
      • 2016-02-10
      • 2013-01-22
      • 2015-01-07
      • 2021-08-23
      • 2012-02-15
      相关资源
      最近更新 更多