-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Fixes #17405: Added plugin icon to plugin list/detail #19333
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
Conversation
@@ -75,3 +75,15 @@ span.color-label { | |||
.btn-grey, .btn-gray { | |||
@extend .btn-secondary; | |||
} | |||
|
|||
img.plugin-icon { | |||
max-width: 1.4285em; |
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.
This was eye-balled (at ~9/7) so that it matched the font-size. I didn't immediately see any variables to re-use here.
// Assuming icon is black/white line art, invert it and tone down brightness | ||
img.plugin-icon { | ||
filter: invert(100%) brightness(80%); | ||
} |
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.
Not loving this approach, unless we'll only ever accept black/white line-drawing-ish icons.
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.
Just a quick drive-by thought: you could consider adding grayscale()
to the filter as well:
filter: grayscale() invert() brightness(80%);
Also, small note - you don't need to specify 100%
for invert
; invert()
, invert(1)
, and invert(100%)
are equivalent. (See MDN docs if helpful.)
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.
Thanks @pheus , appreciate the pointers.
ab6ca96
to
9173a11
Compare
Hat tip to @pheus. Thanks! I did end up leaving the filter function arguments as the Sass processor complains when you try calling a filter function without an argument. :/
Fixes: #17405
icon
URL value from the plugins catalog API