Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Range picker hover state #102

Open
nheath99 opened this issue Aug 4, 2020 · 0 comments
Open

Range picker hover state #102

nheath99 opened this issue Aug 4, 2020 · 0 comments

Comments

@nheath99
Copy link
Owner

nheath99 commented Aug 4, 2020

.cal {
	display: grid;
	grid-template-columns: 50px 50px 50px 50px;

	&:hover {
		.selected ~ .day {
			background-color: lightblue;
		}
	}

	.day {
		padding: 0.5rem 1rem;
		text-align: center;
		border: 1px solid blue;
		border-radius: 5px;
		cursor: pointer;

		&.selected {
			background-color: darkblue;
			color: white;
		}

		&:hover {
			background-color: lightblue;

			& ~ .day:not(.selected) {
				background-color: white;
			}
		}
	}
}

<div class="cal">
	<div class="day"><div class="day-content">1</div></div>
	<div class="day"><div class="day-content">2</div></div>
	<div class="day"><div class="day-content">3</div></div>
	<div class="day"><div class="day-content">4</div></div>
	<div class="day selected"><div class="day-content">5</div></div>
	<div class="day"><div class="day-content">6</div></div>
	<div class="day"><div class="day-content">7</div></div>
	<div class="day"><div class="day-content">8</div></div>
	<div class="day"><div class="day-content">9</div></div>
	<div class="day"><div class="day-content">10</div></div>
</div>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant