Skip to content

Instantly share code, notes, and snippets.

Revisions

  1. chriseppstein revised this gist Apr 16, 2011. 2 changed files with 18 additions and 7 deletions.
    19 changes: 12 additions & 7 deletions input-placeholder_mixin.sass
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,12 @@
    @mixin input-placeholder($color)
    &.placeholder
    color: $color
    &:-moz-placeholder
    color: $color
    &::-webkit-input-placeholder
    color: $color
    // Style this how you want it to look
    .input-placeholder-text
    color: #777

    =input-placeholder
    &.placeholder, &:-moz-placeholder, &::-webkit-input-placeholder
    @extend .input-placeholder-text


    form#login input
    +input-placeholder

    6 changes: 6 additions & 0 deletions output.css
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,6 @@
    .input-placeholder-text,
    form#login input.placeholder,
    form#login input:-moz-placeholder,
    form#login input::-webkit-input-placeholder {
    color: #777777;
    }
  2. @jhilden jhilden renamed this gist Apr 16, 2011. 1 changed file with 0 additions and 0 deletions.
  3. @jhilden jhilden created this gist Apr 16, 2011.
    7 changes: 7 additions & 0 deletions SASS input-placeholder mixin
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,7 @@
    @mixin input-placeholder($color)
    &.placeholder
    color: $color
    &:-moz-placeholder
    color: $color
    &::-webkit-input-placeholder
    color: $color