-
-
Notifications
You must be signed in to change notification settings - Fork 8.9k
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
Yui button inspired style #10061
base: master
Are you sure you want to change the base?
Yui button inspired style #10061
Conversation
Signed-off-by: Thorsten Scherler <[email protected]>
Signed-off-by: Thorsten Scherler <[email protected]>
Heyo. The existing classes for Button should work for your primary/destructive use cases - see https://weekly.ci.jenkins.io/design-library/Buttons/ e.g. You'd want to add an 'outline' modifier though for the 'Analyse now' button, e.g. |
Signed-off-by: Thorsten Scherler <[email protected]>
Signed-off-by: Thorsten Scherler <[email protected]>
@janfaracik makes a lot of sense and thanks for pointing it out (I will follow up with a sample in the design-lib) I renamed the outline example |
@@ -75,6 +75,35 @@ | |||
} | |||
} | |||
|
|||
.jenkins-button--outline { | |||
color: var(--btn-secondary-color) !important; |
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.
--btn-*
vars are deprecated (YUI only), would just use var(--text-color)
if it needs to be set.
.jenkins-button--outline { | ||
color: var(--btn-secondary-color) !important; | ||
border: 2px solid var(--btn-secondary-border); | ||
font-weight: bold; |
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.
These props could be inherited from the base jenkins-button
class.
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(:disabled) { | ||
&:hover { | ||
border: 2px solid var(--accent-color) !important; |
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 wouldn't work if paired with colour modifiers. We've been using currentColor
in our other button modifiers to inherit the colour from modifiers.
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.
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.
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.
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.
Heya, I'm travelling today but I'll take a look as soon as I can :)
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 traveling and MCAAHNY
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, hope you had a good time too :)
.jenkins-button--outline {
color: var(--color, var(--text-color-secondary)) !important;
--button-background--hover: color-mix(in srgb, var(--color, var(--text-color-secondary)) 15%, transparent);
--button-background--active: color-mix(in srgb, var(--color, var(--text-color-secondary)) 20%, transparent);
--button-box-shadow--focus: color-mix(in srgb, var(--color, var(--text-color-secondary)) 10%, transparent);
&::before {
background: transparent;
border: 2px solid var(--color, var(--text-color-secondary));
opacity: 1 !important;
}
&:hover {
&::before {
background: var(--button-background--hover) !important;
}
}
&:active {
&::before {
background: var(--button-background--active) !important;
}
}
}
.jenkins-button[class*="color"] {
background: transparent;
color: var(--color) !important;
&::before {
--button-background: currentColor; // changed this
opacity: 0.1;
}
How is something like this? The buttons styling is a little confusing (and more complex than it needs to be as modern CSS wasn't available when it was originally written, I do wanna tidy up this file)
I’m not totally sure about adding an outline button to core
- I feel our default/secondary style already covers the same ground. Any thoughts on using it as a local class, using a prefix like {plugin-name}-
instead of jenkins-
?
Any thoughts @jenkinsci/sig-ux ?
Signed-off-by: Thorsten Scherler <[email protected]>
…ns into yui_button_inspired_style
Signed-off-by: Thorsten Scherler <[email protected]>
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.
@scherler LGTM.
I tend to agree that we should use the outline button as a local class instead of core. |
I also think that having too many styling options will confuse plugin authors and users. I think all existing styles have a semantic meaning now (default, secondary, destructive), and if the new style has no semantic meaning then we should not add it. What is the reason for adding this new style? Or why does one of the existing buttons do not work? In jenkinsci/warnings-ng-plugin#1912 we also replaced the deprecated outlined YUI button with the Jenkins secondary button style which works quire well. |
Testing done
.jenkins-button--outline
.jenkins-button--outline
(on hover)Proposed changelog entries
Proposed upgrade guidelines
N/A
Submitter checklist
Desired reviewers
@mention
Before the changes are marked as
ready-for-merge
:Maintainer checklist