question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Box-shadows are being cut off

See original GitHub issue

Describe the bug

When rendering a component that has a box-shadow, that box-shadow is being cut off.

I was able to reproduce this on the following layouts: grid, single with or without iframe.

In the reproduction, clicking the button will add a “focus-ring”, which is a box-shadow. As you’ll probably be able to see, the focus-ring is partly cut off.

Reproduction

https://stackblitz.com/edit/histoire-vue3-starter-hktpv8?file=src/BaseButton.story.vue

System Info

System:
    OS: macOS 13.0
    CPU: (16) x64 Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz
    Memory: 974.03 MB / 32.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 16.14.2 - ~/Library/Caches/fnm_multishells/16781_1666724779748/bin/node
    Yarn: 1.22.15 - ~/Library/Caches/fnm_multishells/16781_1666724779748/bin/yarn
    npm: 8.5.0 - ~/Library/Caches/fnm_multishells/16781_1666724779748/bin/npm
  Browsers:
    Chrome: 106.0.5249.119
    Firefox: 106.0.1
    Firefox Developer Edition: 103.0
    Safari: 16.1
  npmPackages:
    @histoire/plugin-nuxt: ^0.11.5 => 0.11.5 
    @histoire/plugin-vue: ^0.11.5 => 0.11.5 
    histoire: ^0.11.5 => 0.11.5 
    vite: ^3.1.8 => 3.1.8

Used Package Manager

pnpm

Validations

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
jfitzsimmons2commented, Nov 13, 2022

@nhedger I added this to my custom Histoire css so I could see my focus styles/shadows.

.histoire-generic-render-story {
    padding: .5rem;
}
0reactions
daguitosamacommented, Nov 23, 2022

There is not just about shadows

I have noticed there is not just shadows being cut off, it’s the actual component, I have solved the issue with the solution above, but i think will be nice to investigate why is this happening . Look additional captures to see how it behaves with borders and even simple text content. This is the repo if some one would like to take a look , can check out the MainHeadign story for instance (last capture).

A component with borders (No historie.css hack) Screen Shot 2022-11-23 at 14 04 44

A component with borders (historie.css hack enabled) Screen Shot 2022-11-23 at 14 05 01

A h1 being cutt off Screen Shot 2022-11-23 at 14 11 24

Read more comments on GitHub >

github_iconTop Results From Across the Web

box-shadow being cut off - css - Stack Overflow
If box-shadow is being cut-off, make sure overflow:visible is set on any div(s) your element is contained in.
Read more >
CSS : box-shadow being cut off - YouTube
CSS : box - shadow being cut off [ Beautify Your Computer : https://www.hows.tech/p/recommended.html ] CSS : box - shadow being cut off...
Read more >
CSS drop shadow on image getting cut off by image wrapper
The same goes for my carousels.. I'd like to add drop shadows to them, but the container cuts off any shadows like the...
Read more >
Box-shadow is being cut out, how is this fixed? - HTML-CSS
You can see the box-shadow is being cut out of the image on all 4 sides. How do I fix it so that...
Read more >
Css – box-shadow being cut off - iTecNote
The problem is your center-main div is cropping off the edge of the shadow. Set overflow:visible on this and you should see it....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found