Skip to content
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

Use the correct iframe width with resize buttons. Fix #226 #225

Merged
merged 1 commit into from
Aug 18, 2023

Conversation

jkevingutierrez
Copy link
Contributor

@jkevingutierrez jkevingutierrez commented Jul 7, 2023

Description

As the iframe has a box-sizing: border-box; inherited from _base.scss the width is being affected by the border that is being applied here (reducing the real width in 2px).

Also, it is prune to other errors, as other properties could affect that width (like adding a padding)

Fixes #226

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • [] I have commented my code, particularly in hard-to-understand areas
  • [] I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have added an appropriate CHANGELOG entry

As the iframe has a `box-sizing: border-box;` inherited from https://github.com/torchbox/django-pattern-library/blob/main/pattern_library/static/pattern_library/src/scss/abstracts/_base.scss the width is being affected by the border that is being applied here, and it could be affected by other properties (like padding)
Copy link
Member

@thibaudcolas thibaudcolas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice one @jkevingutierrez! I’m surprised we didn’t notice this before 😄 Very elegant solution.

Copy link
Member

@thibaudcolas thibaudcolas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice one @jkevingutierrez! I’m surprised we didn’t notice this before 😄 Very elegant solution.

@thibaudcolas thibaudcolas changed the title Fix iframe width Use the correct iframe width with resize buttons. Fix #226 Aug 18, 2023
@thibaudcolas thibaudcolas merged commit c9aaf57 into torchbox:main Aug 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Width is not calculated correctly for the resize buttons
2 participants