V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
• 请不要在回答技术问题时复制粘贴 AI 生成的内容
yantianqi
V2EX  ›  程序员

scss 问题

  •  
  •   yantianqi · Mar 5, 2018 · 1245 views
    This topic created in 2975 days ago, the information mentioned may be changed or developed.

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

    @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;
      }
    }
    
    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3219 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 13:56 · PVG 21:56 · LAX 06:56 · JFK 09:56
    ♥ Do have faith in what you're doing.