-
Notifications
You must be signed in to change notification settings - Fork 16
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
initial draft of a kebab pattern and a card pattern #26
Conversation
@andresgalante @srambach -- Let me know if you have any suggestions. I realize there is a lot going on in this one, but there's a lot I'd like to get your feedback on. I still want to include different variations of the card as currently represented on the patternfly site, but I'm not sure what direction to take the card (as a split out component where we use a card top component, other componenets for the card contents, and a card bottom component, or not). See my comments about this above. I also wanted you to see the kebab in the context of the card, and not just by itself. Some questions I have are:
Thanks! |
.dropdown-toggle::after { | ||
display: none; | ||
} | ||
.btn-link { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
related to this discussion: https://github.com/patternfly/patternfly-atomic/pull/25/files#r86324052
Instead of doing this:
.pf-dropdown__kebab .btn-link
I would use something like this?:
.pf-dropdown__kebab__btn-link
Is this the correct use of dashes and underscores?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It can get messy quickly. :( Definitely if they would have been nested, I think they'd be joined by the __ as a block__element relationship. But, is the kebab a child of the pf-dropdown, or is it a variant of a pf-dropdown? So maybe it's actually .pf-dropdown--kebab__btn-link. Which looks backwards but reading it carefully you'd know it's a btn-link within the kebab variant of a .pf-dropdown? WDYT?
@jgiardino A challenge we are having with the kebab on pf3 is the tiny click zone. We should fix it in pf4 |
Oh, yes. Thank you for reminding me! |
@andresgalante, @srambach, @bleathem I made changes based on our discussion this morning about using partial blocks to include additional card elements. I didn't include an example of a card using other components as contents yet, but the partial block is defined as part of the card. I also created separate files showing different variations of the card. Let me know if there are other variations I should include or any variation I should remove. Some questions/issues that still need to be addressed:
|
top: $pf-spacer-xxxs; | ||
left: $pf-spacer-xxs; | ||
input[type=checkbox] { | ||
//visibility: hidden; is not keyboard accessible and should be replaced with something that keeps the checkbox "visible" in the dom but not rendered on the screen |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's document this. Can we create a mixin so we can reuse the same solution to hide/show elements in different components?
// using z-index to push the checkbox behind the card until it has keyboard focus, or the user hovers over the card | ||
z-index:-1; | ||
position: relative; | ||
width: $pf-spacer-xxxl; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changing the size of an checkbox it's not consistent in different browser. Does it look bad if we use the default?
…ern and multiselection from card pattern, and included utility classes to add margin-bottom to the icons in the card
@andres, @srambach @andresgalante please check the css file for components and make sure the updates are what you expected. Thanks! |
@@ -2,7 +2,7 @@ | |||
// Base styles | |||
// | |||
|
|||
.card { | |||
.pf-card { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all cards (including panels) have the shadow. So that one should actually be .card
, sorry
| Class | Usage | | ||
| -- | -- | | ||
| `.pf-card--accented` **Applied to:** `.card` | **Outcome:** Displays a top border with an accent color **Required:** No | | ||
| `.pf-card--multiselect` **Applied to:** `.card` | **Outcome:** Alters the card layout to accommodate a checkbox **Required:** If displaying a checkbox in the card | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should there be a .pf-card-multiselect in the scss?
Lets merge it, I've created a story to continue with it: https://patternfly.atlassian.net/browse/PTNFLY-1961 thanks @jgiardino you are awesome 😄 |
Addresses Kebab #22
Summary of changes:
updated dropdown pattern to include parameters for:
included two variations of a card pattern
{{#> components-card ...}} card contents here {{/ components-card}}