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

Shadows that are only on one side of a box #1310

Closed
mcoker opened this issue Mar 29, 2024 · 6 comments
Closed

Shadows that are only on one side of a box #1310

mcoker opened this issue Mar 29, 2024 · 6 comments
Assignees
Labels
PatternFly 6 Design issues related to Penta work

Comments

@mcoker
Copy link
Contributor

mcoker commented Mar 29, 2024

Sometimes we want to show a shadow only on one side of a box, on the bottom of a sticky header or top of a sticky footer, or on the right of a vertical nav/sidebar. Our shadows (or at least the ones I checked) show on all sides of a box, even if the main shadow is on one side. Usually this is OK - we can use a "top" shadow on a sticky footer, and whatever the container is for the sticky footer will just cut off the left/right/bottom shadow on the footer box. But depending on where the shadow is used, the excess shadows aren't always cut off.

We have a custom shadow in the sidebar component that applies a bottom shadow to the sidebar panel on narrow screens when it's above the sidebar content. The shadow was modified so that it only applies to the bottom, because we can't always predictably hide any excess shadows on the top/left/right from our standard shadows. Here's a screenshot of the sidebar shadow:

Screenshot 2024-03-29 at 6 20 05 PM

And here's a screenshot if we remove the custom shadow and use one of the standard "bottom" shadows.

Screenshot 2024-03-29 at 6 19 35 PM

A downside to this is that the shadow doesn't visually extend to the full edges of the side it's applied to.

WDYT - is this worth investigating and supporting these types of shadows and potentially updating some of our uses of directional shadows to use this type of shadow?

@mcoker
Copy link
Contributor Author

mcoker commented Apr 2, 2024

Saw a top-shadow on sticky page sections bleeding through from the use of --pf-t--global--box-shadow--sm--bottom on the section

Screenshot 2024-04-02 at 12 04 45 PM

Updated the shadow color to make it a little more obvious

Screenshot 2024-04-02 at 12 05 24 PM

@mcoker
Copy link
Contributor Author

mcoker commented May 20, 2024

cc @lboehling @andrew-ronaldson

@srambach srambach transferred this issue from patternfly/patternfly Jun 6, 2024
@lboehling
Copy link

yeah, let's do this! was noticing this happen in a few sticky demos

@lboehling lboehling self-assigned this Sep 17, 2024
@lboehling lboehling added the PatternFly 6 Design issues related to Penta work label Sep 17, 2024
@lboehling
Copy link

Design token updates to support this:
image
image

I made these updates in this figma branch. If we're good with these changes, I can merge and create a follow up core/tokens issue to get these in!

@andrew-ronaldson @mcoker

@mcoker
Copy link
Contributor Author

mcoker commented Sep 18, 2024

@lboehling lgtm! 🚀

@lboehling
Copy link

merged into main figma file and opened patternfly/design-tokens#89

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PatternFly 6 Design issues related to Penta work
Projects
Status: Done
Development

No branches or pull requests

2 participants