Skip to content

sandman81/stylus-input-placeholder-mixin

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

stylus-input-placeholder-mixin

A mixin for stylus to style placeholder content on input html elements

Add this to your stylus base file

placeholder()
	&::-webkit-input-placeholder
		{block}
	&:-moz-placeholder
		{block}
	&::-moz-placeholder
		{block}
	&:-ms-input-placeholder
		{block}

Examble usage:

ps: DONT FORGET TO ADD THE "+" SIGN BEFORE THE MIXIN NAME!!!


.contact
	input
		+placeholder()
			color #fff

Outputs as:

.contact input::-webkit-input-placeholder {
	color: #fff;
}

.contact input:-moz-placeholder {
	color: #fff;
}

.contact input::-moz-placeholder {
	color: #fff;
}

.contact input:-ms-input-placeholder {
	color: #fff;
}

About

A placeholder mixin for stylus

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • CSS 100.0%