Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

fix(datepicker): ensure the element always blends in with it's parent #7603

Closed
wants to merge 1 commit into from

Conversation

crisbeto
Copy link
Member

fix(datepicker): ensure the element always blends in with it's parent

  • Makes the datepicker component transparent so it always blends in with it's parent.
  • Prevents the content around a datepicker from jumping when it gets opened.

Closes #7502.

@crisbeto crisbeto added the needs: review This PR is waiting on review from the team label Mar 16, 2016
@topherfangio topherfangio added needs: work and removed needs: review This PR is waiting on review from the team labels Mar 21, 2016
@topherfangio
Copy link
Contributor

I am not sure this is ready quite yet. If I manually set the background of my container to something like pink, there is still some part of the datepicker that is set to an incorrect color.

datepicker-background

@crisbeto
Copy link
Member Author

I'm not quite sure that we'd be able to accommodate for all of these cases though (e.g. a grandparent having a background etc.). The alternative could be to set it as transparent and have it inherit only when it's open?

@topherfangio
Copy link
Contributor

I think transparent is okay, but I currently don't understand why we're even setting the background for input elements at all. Is there ever a case in the spec where it doesn't have the same background as the parent container?

@crisbeto
Copy link
Member Author

I don't think so. I'll make it transparent and try out a few more scenarios just in case.

@crisbeto
Copy link
Member Author

I've updated it @topherfangio. Now it's transparent when closed and when it's open, it uses the body background. I also managed to fix an issue where the datepicker would push it's surrounding content when it gets opened.

* Makes the datepicker component transparent so it always blends in with it's parent.
* Prevents the content around a datepicker from jumping when it gets opened.

Closes angular#7502.
@crisbeto crisbeto added needs: review This PR is waiting on review from the team and removed needs: work labels Mar 22, 2016
@crisbeto crisbeto assigned topherfangio and unassigned crisbeto Mar 22, 2016
@topherfangio
Copy link
Contributor

LGTM 👍

@topherfangio topherfangio added pr: merge ready This PR is ready for a caretaker to review and removed needs: review This PR is waiting on review from the team labels Mar 23, 2016
gmoothart pushed a commit to gmoothart/material that referenced this pull request Apr 5, 2016
* Makes the datepicker component transparent so it always blends in with it's parent.
* Prevents the content around a datepicker from jumping when it gets opened.

Closes angular#7502. Closes angular#7603
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
pr: merge ready This PR is ready for a caretaker to review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

md-date-picker no longer transparent
3 participants