V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
yantianqi
V2EX  ›  程序员

scss 问题

  •  
  •   yantianqi · 2018-03-05 17:54:03 +08:00 · 947 次点击
    这是一个创建于 2233 天前的主题,其中的信息可能已经有所发展或是发生改变。

    在别人的代码里看到了如下片段,看不懂?这是什么?

    @include b($block) {
      $B: 'fa-' + $block;
    
      @at-root .#{$B} {
        @content;
      }
    }
    
    @include e($element) {
      $E: $element;
    
      @at-root #{&}--#{$E} {
        @content;
      }
    }
    
    @include m($modifier) {
      $M: $modifier;
    
      @at-root #{&}__#{$M} {
        @content;
      }
    }
    
    @include when($state) {
      $S: 'is-' + $state;
    
      @at-root .#{$S} {
        @content;
      }
    }
    
    目前尚无回复
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5551 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 44ms · UTC 08:36 · PVG 16:36 · LAX 01:36 · JFK 04:36
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.