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
  • !19739

Fix .embed-responsive class in flex container

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Administrator requested to merge github/fork/ntkme/v4-responsive-embed into v4-dev Apr 15, 2016
  • Overview 0
  • Commits 1
  • Pipelines 0
  • Changes 1

Created by: ntkme

Firefox have trouble displaying .embed-responsive in a flex container. Firefox developer said that Firefox has the correct implementation, and other browsers which show .embed-responsive normally were wrong.

This RP fixes the problem regardless of browsers' implementation by move padding into pseudo class ::before, as the padding in pseudo class will be resolved against block .embed-responsive instead of flex parent.

Spec: http://dev.w3.org/csswg/css-flexbox/#item-margins

For blocks in CSS, % padding values are always resolved against the containing block width -- but in flexbox, they're resolved against the length of the containing block's corresponding dimension (width or height).

Authors should avoid using percentages in paddings or margins on flex items entirely, as they will get different behavior in different browsers.

Safari / WebKit: https://bugs.webkit.org/show_bug.cgi?id=113519 Chrome / Blink: https://bugs.chromium.org/p/chromium/issues/detail?id=229568 Firefox: https://bugzilla.mozilla.org/show_bug.cgi?id=958714

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/ntkme/v4-responsive-embed