This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%a.product-btn.product-btn--pic{ href: '#' } | |
Get your insurance checkup |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.avatar | |
%img{ src: 'http://i.imgur.com/IK8SdW2.jpg?1' } | |
.avatar__overlay | |
%a.avatar__link{ href: '#' } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.PG = | |
RailsViews: {} | |
initCurrentView: -> | |
if @currentView? | |
@currentView.undelegateEvents() | |
@currentView = null | |
$container = $('body') | |
viewName = $container.data('view') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.foo { | |
@include relative(top 5rem left 2rem); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@mixin position($position, $args) { | |
@each $dir in top, left, bottom, right { | |
$i: index($args, $dir); | |
@if $i { | |
#{$dir}: nth($args, $i + 1); | |
} | |
} | |
position: $position; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@mixin position($position, $args) { | |
position: $position; | |
@each $dir in top, right, bottom, left { | |
#{$dir}: map-get($args, $dir); | |
} | |
} | |
@mixin absolute($args) { | |
@include position(absolute, $args); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@mixin position_parser($values) { | |
$dirs: (top, 1), | |
(right, 2), | |
(bottom, 3), | |
(left, 4); | |
@each $dir, $i in $dirs { | |
@if nth($values, $i) != null { | |
#{$dir}: nth($values, $i); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.circle { | |
@include circle(5rem); | |
background: #e14b4e; | |
} | |
.rounded { | |
@include rounded-box(5rem, 2rem); | |
background: #07a9ea; | |
} | |
.rounded--custom { | |
@include rounded-box(5rem, 1rem 2rem); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@mixin circle($size) { | |
@include size($size); | |
border-radius: 50%; | |
} | |
@mixin rounded-box($size, $corners) { | |
@include size($size); | |
@include inline-border-radius($corners); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@mixin size($args) { | |
@if length($args) == 2 { | |
width: nth($args, 1); | |
height: nth($args, 2); | |
} | |
@else { | |
width: $args; | |
height: $args; | |
} | |
} |