Sha256: 5f9dd0f0c274124ec24ef0f30905a401b570957d5d406ffaff0b4946bf810664

Contents?: true

Size: 1.34 KB

Versions: 2

Compression:

Stored size: 1.34 KB

Contents

.floating-label {
	color: $black-hint;
	cursor: text;
	font-size: $font-size;
	line-height: 1;
	margin: 0;
	padding: 0;
	position: absolute;
		top: (($input-height - $font-size) / 2);
		left: 0;
	transform-origin: 0 0;
	transition-duration: 0.3s;
	transition-property: color, transform;
	transition-timing-function: $timing;
	.form-group-label [class*="col-"] & {
		// position
			left: $grid-gutter;
	}
	.form-group-label.control-focus &,
	.form-group-label.control-highlight & {
		transform: scale(($font-size-h6 / $font-size), ($font-size-h6 / $font-size)) translateY(($input-height - $line-height) * -1 - ($input-height - $font-size) / 2);
	}
	.form-group-label.control-focus & {
		color: $link-color;
	}
}

.form-group-label {
	margin-top: ($margin-md * 1.5);
	margin-bottom: ($margin-md * 1.5);
	position: relative;
	.form-control {
		position: relative;
		z-index: 1;
		&::placeholder {
			color: transparent;
		}
	}
	legend + & {
		margin-top: ($margin-md / 2);
	}
}

// colour
	@each $color in $palette-list-class {
		$i: index($palette-list-class, $color);

		.form-group-label.form-group-#{$color} .floating-label {
			color: nth($palette-list-color, $i);
		}
	}

.form-icon-label {
	cursor: pointer;
	display: block;
	font-size: $font-size-h4;
	line-height: $line-height-h4;
	padding: (($input-height - $line-height-h4) / 2) 0;
	transition: color 0.15s $timing;
}

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
material-sass-1.4.0 app/assets/stylesheets/material/components/_form-floating-label.scss
material-sass-1.3.0 app/assets/stylesheets/material/components/_form-floating-label.scss