fex-team / fis-parser-sass

A parser plugin for fis to compile sass file.
MIT License
16 stars 12 forks source link

scss语法支持不全 #9

Closed GhostYee closed 10 years ago

GhostYee commented 10 years ago

以下代码会被输出,是否语法支持不全

// input, select, textarea的基础样式
// 边框,padding
%simple-form-basic{
  border: 1px solid $gray;
  padding: 4px;
  vertical-align: middle;
  &:focus{
    outline: 0 none;
  }
}

// 输入框

@mixin simple-text($borderColorFocus: #52a8ec){
  @extend %simple-form-basic;
  height: 18px;

  @include transition(border linear 0.2s, box-shadow linear 0.2s);
  @include box-shadow(inset 0 1px 3px rgba(0, 0, 0, 0.1));

  &:focus{
    border-color: rgba($borderColorFocus, 0.8);
    @include box-shadow(inset 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 8px rgba($borderColorFocus, 0.6));
  }  
}
%simple-text{
  @include simple-text;
}

// textarea
@mixin simple-textarea($borderColorFocus:#52a8ec, $width:500px, $height:80px){
  @include simple-text($borderColorFocus);
  height: $height;
  width: $width;
  vertical-align: top;
}
%simple-textarea{
  @include simple-textarea;
}

// select
%simple-select{
  @extend %simple-form-basic;

  // select lte ie7
  // ie6,7 不支持select的padding
  @if $lte7 {
      *margin-top:5px;
      *margin-bottom:5px;
      *vertical-align:top;
  }
}

%simple-text, %simple-textarea, %simple-select {
  border: 1px solid #ccc;
  padding: 4px;
  vertical-align: middle; }
  %simple-form-basic:focus {
    outline: 0 none; }
fouber commented 10 years ago

这个%的写法有官方文档么?

GhostYee commented 10 years ago

http://www.sass-lang.com/documentation/file.SASS_REFERENCE.html#placeholder_selectors_

------------------ 原始邮件 ------------------ 发件人: "张云龙"; 发送时间: 2014年5月8日(星期四) 下午5:00 收件人: "fouber/fis-parser-sass"; 抄送: ""87651357@qq.com; 主题: Re: [fis-parser-sass] scss语法支持不全 (#9)

这个%的写法有官方文档么?

— Reply to this email directly or view it on GitHub.

fouber commented 10 years ago

@zmyfujian

这个看起来是原生库的一个语法处理bug,可以请 @2betop 看一下。

2betop commented 10 years ago

我看了下libsass目前的开发版本中已经支持这个功能,这几天我把libsass更新一下!

fouber commented 10 years ago

@2betop

花一亭