-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
Add Thumb Label to Slider #976
Conversation
top: $md-slider-thumb-label-top; | ||
width: $md-slider-thumb-label-width; | ||
height: $md-slider-thumb-label-height; | ||
border-radius: max($md-slider-thumb-label-height, $md-slider-thumb-label-width); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not 100% sure what this line is doing. Will these ever not be equal? If so, how would we want this to look?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To clarify, your method would result in a sort of pill-shape when these values do not match. If this is desired, I think what you actually want is half of the smaller dimension: border-radius: min($md-slider-thumb-label-height, $md-slider-thumb-label-width) / 2
. Your method will work too, but that's because the browser caps the border radius at this value.
If you wanted more of an oval shape, you can also simplify it to border-radius: 50%
LGTM, just a few minor comments |
/** Whether or not to show the thumb label. */ | ||
@Input('thumb-label') | ||
@BooleanFieldValue() | ||
private _thumbLabel: boolean = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can't be private
if you're referencing it in a template when doing offline compile. Just remove the private
and leave the underscore.
3b78154
to
49c9391
Compare
@jelbourn: Addressed comments |
LGTM |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Adds a thumb label (https://material.google.com/components/sliders.html#sliders-discrete-slider) to the slider. The thumb label is displayed when
thumb-label
is added to the slider. It will appear whenever the slider is active (a click or a slide).R: @jelbourn @kara
CC: @hansl @robertmesserle