-
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
Included component for an icon with a circle around it, in small, med… #21
Conversation
When updates in _pf-basic-icons.scss are included in patternfly.css, do I also check in patternfly.css, or only _pf-basic-icons.scss? I excluded patternfly.css from my checkin since I wasn't sure. |
} | ||
.pficon-circle-md { | ||
@include pficon-circle(54px, 23px, 50px); | ||
} |
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.
I like calculating based on rem or maybe actually em? Why not do that for -lg and -md?
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.
I thought about that. I would need to use specific rem values instead of variables like $font-size-relative-lg. What does everyone think?
This looks nice. Code looks good on inspection but I haven't tried it out. |
@@ -219,3 +219,12 @@ | |||
.#{$pf-icon-prefix}-zone:before { | |||
content: $pficon-var-zone; | |||
} | |||
.pf-icon-circle-lg { |
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.
For our class names we'll use BEM, following the structure: {{pf-block}}__{{element}}--{{modifier}}
The size is a modifier, but is circle
and element?
@jgiardino @srambach: what do you think? ?
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.
Good call. I think circle is a modifier of icon.
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.
Oh, yes! I've haven't though it that way. If we decouple them `pf-icon--circleand
pf-icon--lg``and``pf-icon-sm``. then we'll make it even more modular.
What do you think?
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.
I agree that circle is a modifier. And I wasn't sure about the use of double dashes, is that something I should include?
I like the idea of separating icon size from the circle. I think that would look like this:
.pf-icon--circle {
width: calc(2em + 4px);
height: calc(2em + 4px);
line-height: 2em;
text-align: center;
border: 2px solid $color-pf-blue-300;
border-radius: 50%;
}
.pf-icon--lg {
font-size: $icon-size-lg;
}
.pf-icon--md {
font-size: $icon-size-md;
}
I don't think this is necessary:
.pf-icon--base {
font-size: $font-size-relative-base;
}
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.
👍 excellent and I agree that --base
is not neccesary
@andresgalante @srambach Let me know if you have anymore suggestions. Thanks! |
I like it even better now :-) |
I've tested and it looks great. Thanks @jgiardino great job! The only thing I'd add is separate doc section for icon-size than icon-circle, following the way we show btns or pagination. Or if we want to keep them together name the file 01-icon-variations and show examples for icons in different sizes with and without circles |
…d examples of all combinations of modifier classes
…y fixing renaming file issue that popped up in the previous commit)
@jgiardino thanks a lot, you are the best! |
Addresses icon with circle
Summary of changes: