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

Container styles break skeleton alignment #9511

Closed
2 tasks done
alissa9090 opened this issue Aug 20, 2021 · 0 comments · Fixed by #9650
Closed
2 tasks done

Container styles break skeleton alignment #9511

alissa9090 opened this issue Aug 20, 2021 · 0 comments · Fixed by #9650
Labels
component: modal package: components carbon-components severity: 3 https://ibm.biz/carbon-severity type: bug 🐛

Comments

@alissa9090
Copy link
Contributor

alissa9090 commented Aug 20, 2021

text-align, padding and maybe other styles break position of skeleton :before.

In case of Modal it's

.bx--modal-footer .bx--btn {
   ...
   padding-top: 1rem;

   padding-bottom: 2rem;
}

What package(s) are you using?

  • carbon-components^1041.0
  • carbon-components-react ^7.41.0

Detailed description

Container styles should not break skeleton alignment.
In our project I've fixed it with

.bx--skeleton,
.bx--skeleton__text {
  &:before {
    top: 0;
    left: 0;
  }
}

Maybe there are other skeleton classes to be included.

Steps to reproduce the issue

  1. Step one

Render Skeleton inside a div.

  1. Step two

set div padding.

Please create a reduced test case in CodeSandbox

https://codesandbox.io/s/adoring-snowflake-5br1d?file=/src/index.js:352-371

Additional information

Screenshot 2021-08-20 at 09 03 04

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: modal package: components carbon-components severity: 3 https://ibm.biz/carbon-severity type: bug 🐛
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants