scss 我重新调整了Zurb 4.3 / 5(主要是添加'medium')网格和块网格以激活相应的媒体查询断点。看到我的全部

我重新调整了Zurb 4.3 / 5(主要是添加'medium')网格和块网格以激活相应的媒体查询断点。请参阅https://github.com/zurb/foundation/issues/3261上的完整帖子

_grid-5-custom.scss
// I've updated the Zurb4.3/5 Grid/block-grid systems to be in line with my suggestions at https://github.com/zurb/foundation/issues/3261
// http://github.com/replete
// Taken from https://github.com/kenips/foundation/commit/d038a4335714197d76ff357e01077b8163aefcda

//
// @version
//   4.3.0
//
// @title
//   Grid
//
// @description
//   With a default "small-#" grid, a 640-1024px "medium-#" grid, and a 1024+ "large-#" grid, we've got you covered for any layout you can think of.
//   Please note that to use the above values in Foundation 4, you will need to change $small-screen to 640px and $medium-screen to 1024px in variables.scss
//

//
// Grid Variables
//
$include-html-grid-classes: true !default;
$row-width: emCalc(1000) !default;
$column-gutter: emCalc(30) !default;
$total-columns: 12 !default;

//
// Grid Calc Function
//
@function gridCalc($colNumber, $totalColumns) {
  @return percentage(($colNumber / $totalColumns));
}

// Right and Left "auto" for grid
%right-auto { #{$opposite-direction}: auto; }
%left-auto { #{$default-float}: auto; }

//
// Grid Mixins
//

// Create default, nested, and collapsed rows
@mixin grid-row($behavior: false) {

  // use @include grid-row(nest); to include a nested row
  @if $behavior == nest {
    margin-#{$default-float}: -($column-gutter/2);
    margin-#{$opposite-direction}: -($column-gutter/2);
    max-width: none;
    width: auto;
  }

  // use @include grid-row(collapse); to collapsed a container row margins
  @else if $behavior == collapse {
    margin-#{$default-float}: 0;
    margin-#{$opposite-direction}: 0;
    max-width: $row-width;
    width: 100%;
  }

  // use @include grid-row(nest-collapse); to collapse outer margins on a nested row
  @else if $behavior == nest-collapse {
    margin-#{$default-float}: 0;
    margin-#{$opposite-direction}: 0;
    max-width: none;
    width: auto;
  }

  // use @include grid-row; to use a container row
  @else {
    margin-#{$default-float}: auto;
    margin-#{$opposite-direction}: auto;
    margin-top: 0;
    margin-bottom: 0;
    max-width: $row-width;
    width: 100%;
  }

  @include clearfix;
}


// For creating columns - @include these inside a media query to control small vs. large grid layouts
@mixin grid-column($columns:false, $last-column:false, $center:false, $offset:false, $push:false, $pull:false, $collapse:false, $float:true, $include-position-relative: false) {

  // If collapsed, get rid of gutter padding
  @if $collapse {
    padding-left: 0;
    padding-right: 0;
  }

  // Gutter padding whenever a column isn't set to collapse
  // (use $collapse:null to do nothing)
  @else if $collapse == false {
    padding-left: $column-gutter / 2;
    padding-right: $column-gutter / 2;
  }

  // If a column number is given, calculate width
  @if $columns {
    width: gridCalc($columns, $total-columns);

    // If last column, float naturally instead of to the right
    @if $last-column { float: $opposite-direction; }
  }

  // If offset, calculate appropriate margins
  @if $offset { margin-#{$default-float}: gridCalc($offset, $total-columns); }

  // Source Ordering, adds left/right depending on which you use.
  @if $push { #{$default-float}: gridCalc($push, $total-columns); #{$opposite-direction}: auto; }
  @if $pull { #{$opposite-direction}: gridCalc($pull, $total-columns); #{$default-float}: auto; }

  // If centered, get rid of float and add appropriate margins
  @if $center {
    margin-#{$default-float}: auto;
    margin-#{$opposite-direction}: auto;
    float: none !important;
  }

  @if $float {
    @if $float == left or $float == true { float: $default-float; }
    @else if $float == right { float: $opposite-direction; }
    @else { float: none; }
  }

  // This helps us not need to repeat "position:relative" everywehere
  @if $include-position-relative { position: relative; }
}


@if $include-html-grid-classes != false {
  /* Grid HTML Classes */
  .row {
    @include grid-row;

    &.collapse {
      .column,
      .columns { @include grid-column($collapse:true); }
    }

    .row { @include grid-row($behavior:nest);
      &.collapse { @include grid-row($behavior:nest-collapse); }
    }
  }

  .column,
  .columns { @include grid-column($columns:$total-columns, $include-position-relative: true); }

  @media #{$screen} {

    @for $i from 1 through $total-columns {
      .default#{-$i} { @include grid-column($columns:$i,$collapse:null,$float:false); }
    }

    @for $i from 0 through $total-columns - 2 {
      .default-offset-#{$i} { @include grid-column($offset:$i, $collapse:null,$float:false); }
    }

    [class*="column"] + [class*="column"]:last-child { float: $opposite-direction; }
    [class*="column"] + [class*="column"].end { float: $default-float; }

    .column.default-centered,
    .columns.default-centered { @include grid-column($center:true, $collapse:null, $float:false); }
  }

  @media #{$small} {

    @for $i from 1 through $total-columns {
      .small#{-$i} { @include grid-column($columns:$i,$collapse:null,$float:false); }
    }

    @for $i from 0 through $total-columns - 1 {
      .small-offset-#{$i} { @include grid-column($offset:$i, $collapse:null,$float:false); }
    }

    @for $i from 1 through $total-columns - 1 {
      .small-push#{-$i} { @include grid-column($push:$i, $collapse:null, $float:false); }
      .small-pull#{-$i} { @include grid-column($pull:$i, $collapse:null, $float:false); }
    }

    .column.small-centered,
    .columns.small-centered { @include grid-column($center:true, $collapse:null, $float:false); }

    .column.small-uncentered,
    .columns.small-uncentered {
      margin-#{$default-float}: 0;
      margin-#{$opposite-direction}: 0;
      float: $default-float !important;
    }

  }

  @media #{$medium} {

    @for $i from 1 through $total-columns {
      .medium#{-$i} { @include grid-column($columns:$i,$collapse:null,$float:false); }
    }

    @for $i from 0 through $total-columns - 1 {
      .medium-offset-#{$i} { @include grid-column($offset:$i, $collapse:null,$float:false); }
    }

    @for $i from 1 through $total-columns - 1 {
      .medium-push#{-$i} { @include grid-column($push:$i, $collapse:null, $float:false); }
      .medium-pull#{-$i} { @include grid-column($pull:$i, $collapse:null, $float:false); }
    }

    .column.medium-centered,
    .columns.medium-centered { @include grid-column($center:true, $collapse:null, $float:false); }

    .column.medium-uncentered,
    .columns.medium-uncentered {
      margin-#{$default-float}: 0;
      margin-#{$opposite-direction}: 0;
      float: $default-float !important;
    }

  }

  @media #{$large} {

    @for $i from 1 through $total-columns {
      .large#{-$i} { @include grid-column($columns:$i,$collapse:null,$float:false); }
    }

    @for $i from 0 through $total-columns - 1 {
      .large-offset-#{$i} { @include grid-column($offset:$i, $collapse:null,$float:false); }
    }

    @for $i from 1 through $total-columns - 1 {
      .large-push#{-$i} { @include grid-column($push:$i, $collapse:null, $float:false); }
      .large-pull#{-$i} { @include grid-column($pull:$i, $collapse:null, $float:false); }
    }

    .column.large-centered,
    .columns.large-centered { @include grid-column($center:true, $collapse:null, $float:false); }

    .column.large-uncentered,
    .columns.large-uncentered {
      margin-#{$default-float}: 0;
      margin-#{$opposite-direction}: 0;
      float: $default-float !important;
    }

  }

}
_block-grid-5-custom.scss
// I've updated the Zurb4.3/5 Grid/block-grid systems to be in line with my suggestions at https://github.com/zurb/foundation/issues/3261
// http://github.com/replete

//
// Block Grid Variables
//
$include-html-grid-classes: $include-html-classes !default;

// We use this to control the maximum number of block grid elements per row
$block-grid-elements: 12 !default;
$block-grid-default-spacing: emCalc(20) !default;

// Enables media queries for block-grid classes. Set to false if writing semantic HTML.
$block-grid-media-queries: true !default;

//
// Block Grid Mixins
//

// We use this mixin to create different block-grids. You can apply per-row and spacing options.
// Setting $base-style to false will ommit default styles.
@mixin block-grid($per-row:false, $spacing:$block-grid-default-spacing, $base-style:true) {

  @if $base-style {
    display: block;
    padding: 0;
    margin: 0 (-$spacing/2);
    @include clearfix;

    &>li {
      display: inline;
      height: auto;
      float: $default-float;
      padding: 0 ($spacing/2) $spacing;
    }
  }

  @if $per-row {
    &>li {
      width: 100%/$per-row;
      padding: 0 ($spacing/2) $spacing;

      &:nth-of-type(n) { clear: none; }
      &:nth-of-type(#{$per-row}n+1) { clear: both; }
    }
  }

}

@if $include-html-grid-classes {
  /* Foundation Block Grids for below small breakpoint */
  @media #{$screen} {
    [class*="block-grid-"] { @include block-grid; }

    @for $i from 1 through $block-grid-elements {
      .default-block-grid-#{($i)} {
        @include block-grid($i,$block-grid-default-spacing,false);
      }
    }
  }

  /* Foundation Block Grids for above small breakpoint */
  @media #{$small} {
    /* Remove smaller grid clearing */
    @for $i from 1 through $block-grid-elements {
      .default-block-grid-#{($i)} > li:nth-of-type(#{$i}n+1) { clear: none; }
    }
    @for $i from 1 through $block-grid-elements {
      .small-block-grid-#{($i)} {
        @include block-grid($i,$block-grid-default-spacing,false);
      }
    }
  }

  /* Foundation Block Grids for above medium breakpoint */
  @media #{$medium} {
    /* Remove smaller grid clearing */
    @for $i from 1 through $block-grid-elements {
      .default-block-grid-#{($i)} > li:nth-of-type(#{$i}n+1) { clear: none; }
    }
    @for $i from 1 through $block-grid-elements {
      .small-block-grid-#{($i)} > li:nth-of-type(#{$i}n+1) { clear: none; }
    }
    @for $i from 1 through $block-grid-elements {
      .medium-block-grid-#{($i)} {
        @include block-grid($i,$block-grid-default-spacing,false);
      }
    }
  }

/* Foundation Block Grids for above large breakpoint */
  @media #{$large} {
    /* Remove small grid clearing */
    @for $i from 1 through $block-grid-elements {
      .default-block-grid-#{($i)} > li:nth-of-type(#{$i}n+1) { clear: none; }
    }
    @for $i from 1 through $block-grid-elements {
      .small-block-grid-#{($i)} > li:nth-of-type(#{$i}n+1) { clear: none; }
    }
    @for $i from 1 through $block-grid-elements {
      .medium-block-grid-#{($i)} > li:nth-of-type(#{$i}n+1) { clear: none; }
    }
    @for $i from 1 through $block-grid-elements {
      .large-block-grid-#{($i)} {
        @include block-grid($i,$block-grid-default-spacing,false);
      }
    }
  }

}

scss mixin的gridify.scss

mixin-gridify.scss
// Make elements align in a grid, regardless of height
// Apply to elements you want as grid items
// $cols = how many columns you want
// $margin-right = margin-right, should be in percent
// $ie8-height = an explicit height for all the elements, "off" by default, only applied to IE
@mixin gridify($cols, $margin-right: 5%, $ie8-height: auto) {
  // Math for widths, margins, and clears
  $width: (100% / $cols) - $margin-right + ($margin-right / $cols);
  $ie-width: (100% / $cols) - $margin-right;
  $clearnum: $cols + 1;

  // Default styles for each grid item
  clear: none;
  display: block;
  float: left;
  margin-right: $margin-right;
  width: $width;

  // Resetting from any previous uses of this mixin
  &:nth-child(odd),
  &:nth-child(even) {
    clear: none;
    margin-right: $margin-right;
  }

  // Clear the rows
  &:nth-child(#{$cols}n+#{$clearnum}) {
    clear: left;
  }
  // Remove margin-right from last column
  &:nth-child(#{$cols}n+#{$cols}) {
    margin-right: 0;
  }

  // Fix for IE8 since it can't handle :nth-child()
  .lt-ie9 & {
    height: $ie8-height;
    width: $ie-width;
  }
}

scss _mixins.scss

_mixins.scss
@mixin box-shadow($top, $left, $blur, $color, $inset: false) {
  @if $inset {
    -webkit-box-shadow:inset $top $left $blur $color;
    -moz-box-shadow:inset $top $left $blur $color;
    box-shadow:inset $top $left $blur $color;
  } @else {
    -webkit-box-shadow: $top $left $blur $color;
    -moz-box-shadow: $top $left $blur $color;
    box-shadow: $top $left $blur $color;
  }
}

@mixin text-field {
 display: inline-block;
  outline: none;
  text-decoration: none;
  font: 14px/100% Arial, Helvetica, sans-serif;
  padding: .5em;
  text-shadow: 0 1px 1px rgba(0,0,0,.3);
  @include rounded();
  @include box-shadow(0, 1px, 2px, rgba(0, 0, 0, 0.2));
}

@mixin button($color: $red, $text_color: $white) {
  display: inline-block;
  outline: none;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  font: 14px/100% Arial, Helvetica, sans-serif;
  padding: .5em 2em .55em;
  text-shadow: 0 1px 1px rgba(0,0,0,.3);
  @include rounded();
  @include box-shadow(0, 1px, 2px, rgba(0, 0, 0, 0.2));

  color: $text_color !important;
  font-weight: bold;
  border: solid 1px darken($color, 18%);
  background: $color;
  @include gradient(saturate($color, 15%), darken($color, 15%));

  &:hover {
    text-decoration: none;
    background: saturate($color, 10%);
    @include gradient(saturate($color, 5%), darken($color, 5%));
  }

  &:active {
    position: relative;
    top: 1px;
    color: saturate($color, 15%);
    @include gradient(saturate($color, 15%), lighten($color, 15%));
  }
}

@mixin rounded($radius: 0.5em) {
  -webkit-border-radius: $radius;
  -moz-border-radius: $radius;
  border-radius: $radius;
}

@mixin gradient($from, $to) {
  background: -webkit-gradient(linear, left top, left bottom, from($from), to($to));
  background: -moz-linear-gradient(top,  $from, $to);
  filter:  progid:DXImageTransform.Microsoft.gradient(startColorstr='#{$from}', endColorstr='#{$to}');
}

scss 长阴影发生器Sass mixin

长阴影发生器Sass mixin

long-shadow-mixin.scss
//Long Shadow
//http://codepen.io/awesomephant/pen/mAxHz
//Usage: @include long-shadow(box/text, #000, 200, false, false, left);

@mixin long-shadow($type, $color, $length, $fadeout: true, $skew: false, $direction: right){
  $shadow: '';
  @if $skew == false or $type == text{
    @if $direction == right {
      @for $i from 0 to $length - 1 {
        $shadow: $shadow + $i + 'px ' + $i + 'px 0 ' + $color + ',';
      }
    }
    @if $direction == left {
      @for $i from 0 to $length - 1 {
        $shadow: $shadow + $i * -1 + 'px ' + $i + 'px 0 ' + $color + ',';
       }
      }
     }
        
   @if $fadeout == true{
    @for $i from 1 to $length - 1 {
      @if $type == text or $skew == false{
        @if $direction == right{
          $shadow: $shadow + $i + 'px ' + $i + 'px 0 ' +       rgba($color, 1 - $i / $length) + ',';
        }
        @if $direction == left{
          $shadow: $shadow + $i * -1 + 'px ' + $i + 'px 0 ' +       rgba($color, 1 - $i / $length) + ',';
        }
      }
      @if ($type == box) and $skew == true{
        @if $direction == right {
          $shadow: $shadow + $i + 'px ' + $i + 'px 0 ' + $i * .2 + 'px ' + rgba($color, 1 - $i / $length) + ',';
        }
        @if $direction == left {
          $shadow: $shadow + $i * -1 + 'px ' + $i + 'px 0 ' + $i * .2 + 'px ' + rgba($color, 1 - $i / $length) + ',';
        }
      }
  }
  $shadow: $shadow + $length + 'px ' + $length + 'px 0 ' + rgba($color, 0);
 }
 @if $fadeout == false{
   @if $skew == true and ( $type == box ){
     @for $i from 0 to $length - 1 {
            $shadow: $shadow + $i + 'px ' + $i + 'px 0 ' + $i * .1 + 'px ' + $color + ',';
      }
   }
    $shadow: $shadow + $length + 'px ' + $length + 'px 0 ' + rgba(0,0,0,0);
 }
 $shadow: unquote($shadow);
  @if $type == 'box' {box-shadow: $shadow;}
  @if $type == 'text' {text-shadow: $shadow;}
}

scss gistfile1.scss

gistfile1.scss
// Default font size
$base-font-size: 16px;

// px2em
// Use: font-size: px2em( 12px, 14px );
@function px2em( $target, $context: $base-font-size ) {
	@if $target == 0 {
   		@return 0;
   	}

	@return $target / $context + 0em;
}

scss Bootstrap 3表格登录SASS(http://getbootstrap.com/examples/signin/)

Bootstrap 3表格登录SASS(http://getbootstrap.com/examples/signin/)

_form_signin.scss
.form-signin {
  max-width: 330px;
  padding: 15px;
  margin: 0 auto;
  .form-signin-heading, .checkbox {
    margin-bottom: 10px;
  }
  .checkbox {
    font-weight: normal;
  }
  .form-control {
    position: relative;
    font-size: 16px;
    height: auto;
    padding: 10px;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    &:focus {
      z-index: 2;
    }
  }
  input[type="text"] {
    margin-bottom: -1px;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
  }
  input[type="password"] {
    margin-bottom: 10px;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
  }
}

scss _ios_seven.scss

ios_seven.scss
// ios_seven.scss
@import 'main';
@import 'ios_seven';
default.scss
// default.scss
@import 'main'
app_delegate.rb
class AppDelegate
  def application(application, didFinishLaunchingWithOptions:launchOptions)
    stylesheet = (Device.ios_version.to_f >= 7.0) ? 'ios_seven.css' : 'default.css'
    PXEngine.styleSheetFromFilePath(File.join(NSBundle.mainBundle.resourcePath, stylesheet), withOrigin:0)
    true
  end
end
_ios_seven.scss
// _ios_seven.scss
// iOS 7 specific styles

scss _retina.scss

example.scss
@import "retina";

.body-text {
  font-weight: normal;

  @include retina {
    font-weight: 300;
  }
}
_retina.scss
@mixin retina($ratio: 1.5) {
  $dpi: $ratio * 96;
  $opera-ratio: $ratio * 100;

  @media only screen and (-webkit-min-device-pixel-ratio: #{$ratio}),
         only screen and (     -o-min-device-pixel-ratio: '#{$opera-ratio}/100'),
         only screen and (                min-resolution: #{$dpi}dpi),
         only screen and (                min-resolution: #{$ratio}dppx) {
    @content;
  }
}

scss button-semantics.scss:显示非语义按钮/链接元素的警报。用法:在清单文件的末尾包含此内容。 IMPOR

button-semantics.scss:显示非语义按钮/链接元素的警报。用法:在清单文件的末尾包含此内容。重要提示:仅限开发使用 - 不要使用生产代码进行编译。(灵感来自:@heydonworks文章http://coding.smashingmagazine.com/2013/08/20/semantic-css-with-intelligent-selectors)

button-semantics.scss
//
// House Keeping - Button Semantics
// --------------------------------------------------


// Alert Message Style
// ---------------------

@mixin house-keeping-alert() {
  display: block !important;
  padding: 0.5em 1em !important;
  background: #f00 !important;
  color: #fff !important;
  font-family: sans-serif !important;
  font-size: 16px !important;
  text-decoration: none!important;
  text-shadow: none!important;
}


// Buttons and Links
// ---------------------

// If it’s a hyperlink, it should have an href attribute.
a:not([href]):after {
  content: 'Do you mean for this to be a link or a button, because it does not link to anything!';
  @include house-keeping-alert();
}


// If it’s a hyperlink and has an href attribute, it should have a valid value.
a[href=""]:after, 
a[href$="#"]:after, 
a[href^="javascript"]:after {
  content: 'Do you mean for this link to be a button, because it does not go anywhere!';
  @include house-keeping-alert();
}


// If it uses a button class, it should be a button — at least in the accessibility layer.
.btn:not(button):not([role="button"]):not([type="button"]):not([type="submit"]):not([type="reset"]):after, 
.button:not(button):not([role="button"]):not([type="button"]):not([type="submit"]):not([type="reset"]):after, 
a[class*="btn"]:not([role="button"]):after,
a[class*="button"]:not([role="button"]):after,
[class*="btn"]:not([role="button"]):after,
[class*="button"]:not([role="button"]):after {
  content: 'If you are going to make it look like a button, make it a button, damn it!';
  @include house-keeping-alert();
}


// If it is an a element with role="button", then it should link to somewhere when JavaScript is off.
a[role="button"]:not([href*="/"]):not([href*="."]):not([href*="?"]):after {
  content: 'Either use a link fallback, or just use a button element.';
  @include house-keeping-alert();
}


// You can’t disable a hyperlink.
a.button[class*="disabled"]:after, 
a.btn.disabled:after,
a[class*="button"][class*="disabled"]:after {
  content: 'You cannot disable a hyperlink. Use a button element with type="disabled".';
  @include house-keeping-alert();
}


// Buttons in forms should have explicit types.
form button:not([type]):after {
  content: 'Is this a submit button, a reset button or what? Use type="submit", type="reset" or type="button"';
  @include house-keeping-alert();
}


// Both hyperlinks and buttons should have some sort of content or an ARIA label.
a:empty:not([aria-label]):not([aria-labelledby]):after, 
button:empty:not([aria-label]):not([aria-labelledby]):after, 
button:not([aria-label]):not([aria-labelledby]) img:only-child:not([alt]):after, 
a:not([aria-label]):not([aria-labelledby]) img:only-child:not([alt]):after {
   content: 'All buttons and links should have text content, an image with alt text or an ARIA label';
   @include house-keeping-alert();
}

scss 嵌入式视频响应

嵌入式视频响应

video.scss
.videocontainer {
  position: relative;
  padding-bottom: 56.25%;
  padding-top: 30px;
  height: 0;
  overflow: hidden;
	iframe,
	object,
	embed {
	  position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
	}
}