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

[bug] <rh-card>: incorrect spacing between header and paragraphs #1384

Open
zeroedin opened this issue Dec 13, 2023 · 3 comments
Open

[bug] <rh-card>: incorrect spacing between header and paragraphs #1384

zeroedin opened this issue Dec 13, 2023 · 3 comments

Comments

@zeroedin
Copy link
Collaborator

zeroedin commented Dec 13, 2023

Note: Will be true after #1380 merges

Screenshot 2023-12-13 at 4 59 50 PM

https://deploy-preview-1380--red-hat-design-system.netlify.app/elements/card/demo/variants/

Per the design spec we should only have 32px here. However we have 32px margin on #body + 16px margin on the <p>.

@zeroedin
Copy link
Collaborator Author

zeroedin commented Dec 16, 2023

Related possible future state css: https://developer.apple.com/videos/play/wwdc2023/10121/?time=238

@bennypowers
Copy link
Member

it's not clear to me that this can be done from the shadow root.

  • there's no :first-of-type-in-slot pseudo class,
  • we can't ::slotted(* + p:first-of-type) because complex selectors aren't allowed
  • we can't :first-child, because what if the heading is the first child?
  • we can't :first-of-type, because the p that comes after the body image is the first of type

we could add a special slot for the logo image, but i'm preeeeetty sure that's not a proper solution (too specific)

or we could say "this is a pattern-level issue" i.e. require light-dom css

@zeroedin
Copy link
Collaborator Author

it's not clear to me that this can be done from the shadow root.

This was my findings, unfortunately just no way of doing it given complex selectors not being allowed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Backlog
Development

No branches or pull requests

2 participants