Thema: Mixin in Sass
Einzelnen Beitrag anzeigen
  #5 (permalink)  
Alt 15.04.2017, 19:03
kloeten kloeten ist offline
Benutzer
neuer user
Thread-Ersteller
 
Registriert seit: 14.12.2007
Beiträge: 32
kloeten befindet sich auf einem aufstrebenden Ast
Standard

Die Zeile stammt aus der Datei in der die Mixins deklariert werden. Hier mal der komplette Inhalt.

Code:
// Mixins
// ------
// Mixins allow you to define styles that can be re-used
// throughout the stylesheet without needing to resort to
// non-semantic classes like .float-left. Mixins can also
// contain full CSS rules, and anything else allowed
// elsewhere in a Sass document. They can even take
// arguments which allows you to produce a wide variety
// of styles with very few mixins.
//
// For complete documentation:
// Sass mixins:		http://sass-lang.com/docs/yardoc/file.SASS_REFERENCE.html#mixins
// Bourbon mixins: 	http://bourbon.io/docs/

// Import variables for use in Mixins.
@import _variables.sass

// Rounded corners mixin.
@mixin border-radius($top: 10px, $right: $top, $bottom: $top, $left: $right)
  border-radius: $top $right $bottom $left
  -moz-border-radius: $top $right $bottom $left
  -webkit-border-top-left-radius: $top
  -webkit-border-top-right-radius: $right
  -webkit-border-bottom-right-radius: $bottom
  -webkit-border-bottom-left-radius: $left

@mixin grid-column
  width: 22%
  margin: 1%
  float: left
  
// Variables/Media Query

$tablet-width: 768px
$desktop-width: 1024px

=tablet
  @media (min-width: $tablet-width) and (max-width: $desktop-width - 1px)

  @content

=desktop
  @media (min-width: $desktop-width)

  @content
Mit Zitat antworten