简体   繁体   中英

Shortcut for @extend in SASS

SASS中是否存在@extend的快捷方式,例如=表示@mixin+表示@include

Maybe this could work by adding a custom function as described here (I am at work and not able to test it)

module Sass::Script::Functions
  def *(string)
      assert_type string, :String
      Sass::Script::String.new(string.value.sub('*', '@require')
  end
  declare :*, :args => [:string]
end

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM