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

checkbox. Release 1.1.0-rc.5. Chrome v.52. Label is not centered #9351

Closed

Description

@vladimir-barsuchenko

I use your latest Angular Material Release 1.1.0-rc.5.
And your official codepen.
Windows 10. Chrome Version 52.0.2743.116 m

When I resize a window or simply checkbox parent container. Label position is calculated wrong.
It seems like the trouble is in fractional numbers. And Chrome has issues with it.
Because if I increase width of checkbox container in 1px alignment is perfect.

I have no issues with latest Firefox.

md-checkbox.md-checked ._md-icon:after {
    box-sizing: border-box;
    -webkit-transform: rotate(45deg);
    transform: rotate(45deg);
    position: absolute;
    left: 6.67px;
    top: 2.22px;
    display: table;
    width: 6.67px;
    height: 13.33px;
    border-width: 2px;
    border-style: solid;
    border-top: 0;
    border-left: 0;
    content: '';
}

capture

Activity

  1. added
    has: Pull Request
    on Aug 19, 2016
  2. clshortfuse commented on Aug 19, 2016

    @clshortfuse
    Contributor

    There won't be any fractional numbers when we change checkbox's size to 18px in #8713. Currently, it's 20px which doesn't divide into whole numbers.

    Edit: I will add though, that checkbox labels aren't supposed to be centered according to spec. They're supposed to align to the top. See https://material.google.com/components/text-fields.html#text-fields-single-line-text-field (picture on left)

  3. ThomasBurleson commented on Aug 22, 2016

    @ThomasBurleson
    Contributor

    @clshortfuse - what is the PR #?

  4. added this to the 1.2.0 milestone on Aug 22, 2016
  5. clshortfuse commented on Aug 22, 2016

    @clshortfuse
    Contributor

    @ThomasBurleson Sorry, was embedded in the text:

    PR: #8713

  6. added 2 commits that reference this issue on Oct 31, 2016
    6906cba
    cb33f13
  7. modified the milestones: Future, 1.2.0 on Jan 29, 2018
  8. changed the title [-]md-checkbox. Release 1.1.0-rc.5. Chrome v.52. Label is not centered[/-] [+]checkbox. Release 1.1.0-rc.5. Chrome v.52. Label is not centered[/+] on Feb 23, 2019
  9. added 3 commits that reference this issue on Jun 19, 2020
    21f6f23
    845b994
    dec05c4
  10. added a commit that references this issue on Jun 29, 2020
    8b390d1
  11. added a commit that references this issue on Jun 29, 2020
    c893050
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    has: Pull Requestresolution: fixedtype: bug

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions