sass - How can I implement @use with layer()? - Stack Overflow

In CSS, @import "typography" layer(typography) will scope an import to that cascade layer.Ho

In CSS, @import "typography" layer(typography) will scope an import to that cascade layer.

However, in Sass @import is deprecated, and according to this Sass issue, it doesn't seem like the plan is to support layer() function for @use.

Is there an equivalent way to attach imported @use styles to a cascade layer?

Neither of these solutions currently work:

@use 'typography' layer(typography)

@layer typography { 
  @use 'typography';
}

The only way seems to be modifying the file being imported to wrap everything in a layer, which is an option in some cases but not if it's an external library.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745084670a4610332.html

相关推荐

  • sass - How can I implement @use with layer()? - Stack Overflow

    In CSS, @import "typography" layer(typography) will scope an import to that cascade layer.Ho

    12小时前
    20

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信