Permalink
Browse files

Added placeholder mixin to style css3 inputs

  • Loading branch information...
Phil LaPier
Phil LaPier committed Feb 1, 2013
1 parent da1fa40 commit c38ba2d8920b641fb646da849b85ed4da421296e
Showing with 19 additions and 0 deletions.
  1. +1 −0 app/assets/stylesheets/_bourbon.scss
  2. +18 −0 app/assets/stylesheets/css3/_placeholder.scss
@@ -32,6 +32,7 @@
@import "css3/transform";
@import "css3/transition";
@import "css3/user-select";
+@import "css3/placeholder";
// Addons & other mixins
@import "addons/button";
@@ -0,0 +1,18 @@
+$placeholders: '-webkit-input-placeholder',
+ '-moz-placeholder',
+ '-ms-input-placeholder';
+
+@mixin placeholder {
+ @each $placeholder in $placeholders {
+ @if $placeholder == "-webkit-input-placeholder" {
+ &::#{$placeholder} {
+ @content;
+ }
+ }
+ @else {
+ &:#{$placeholder} {
+ @content;
+ }
+ }
+ }
+}

1 comment on commit c38ba2d

treppo commented on c38ba2d Feb 2, 2013

👍

Please sign in to comment.