Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • B bootstrap
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 263
    • Issues 263
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 114
    • Merge requests 114
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Bootstrap
  • bootstrap
  • Merge requests
  • !18191

Fixed: IE and Edge round percentages too aggressively

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Administrator requested to merge github/fork/FremyCompany/IE_EDGE_PERCENTAGE_FIX into master Nov 06, 2015
  • Overview 0
  • Commits 1
  • Pipelines 0
  • Changes 2

Created by: FremyCompany

Hi,

I'm a Layout PM of the Edge team and I recently detected a defect in our engine which affects a (probably very) small amount of websites using Bootstrap.

While the bug is general and probably worth fixing anyway, I figured out you may be interested in integrating a fix which will keep your users away from the issue. If so, feel free to do it. If not, this pull request will at least serve as a searchable reference in case anyone face this issue in the future.

The issue is related to how IE/Edge parses css percentages. Percentage values like are seemingly floored to two decimals only 66.666667% = 66.66%. In most cases, that doesn't affect the visual rendering if you stick to using percentages for your entire layout. Infrequently, some people seem to use pixel units in their layout and rely on those working for proper wrapping, which causes issues in IE/Edge.

You can see the issue here: http://codepen.io/anon/pen/WQavNy

The proposed fix is to avoid the CSS Parser for percentages and to let browsers compute the right value directly using a calc expression like calc(100% * 4 / 12). This has the nice advantage of being easily readable in the source code.

You can see the fix here: http://codepen.io/anon/pen/EVdjKa

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/FremyCompany/IE_EDGE_PERCENTAGE_FIX