-
Notifications
You must be signed in to change notification settings - Fork 1
feat: button styles and button-group #54
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
|
Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch and validate page speed.
|
|
0591bad to
36855f0
Compare
36855f0 to
836cc5d
Compare
836cc5d to
c96456c
Compare
catheraaine
left a comment
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.
Button group is great, it solves for a single button placed as a block, too, like we might need in the jobs pre-footer. I am sure you're not yet finished with documentation, but could you add a note in there that a button group can include just one button?
Some notes:
1. 😏 -webkit-font-smoothing: antialiased;
2. I think we're using the wrong blues? Visually they look different to me on both default and hover
3. We'll need the static white button for over callouts, might as well build the static black one, too
| anchorNode: row.children[0].firstChild.firstChild, | ||
| buttonStyle: row.children[1].firstChild, | ||
| altText: row.children[2].firstChild | ||
| })); |
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 really like this map solve for making the components and I've stolen it for my own work.
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.
🪓
styles/styles.css
Outdated
| background-color: var(--color-background-button-hover); | ||
| cursor: pointer; | ||
| .button--primary { | ||
| --color-button-primary-background: rgb(from var(--spectrum-black) r g b / 84%); |
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.
| --color-button-primary-background: rgb(from var(--spectrum-black) r g b / 84%); | |
| --color-button-background-primary: rgb(from var(--spectrum-black) r g b / 84%); |
styles/styles.css
Outdated
| --color-button-primary-background: rgb(from var(--spectrum-black) r g b / 84%); | ||
| --color-button-primary-background-hover: rgb(from var(--spectrum-black) r g b / 93%); | ||
| --color-button-primary-background-disabled: rgb(from var(--spectrum-black) r g b / 9%); | ||
| --color-text-button-primary: var(--spectrum-white); |
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.
| --color-text-button-primary: var(--spectrum-white); | |
| --color-button-text-primary: var(--spectrum-white); |
or
--color-background-button-primary:
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.
since these have been moved out of global scope and into component scope, we should have the component first, methinks
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 point! I suppose if I was going to organize this in Figma or something, it'd go
--color-button-background-primary: /* ... */
--color-button-background-primary-hover: /* ... */and so on.
styles/styles.css
Outdated
| --color-button-primary-background: rgb(from var(--spectrum-white) r g b / 85%); | ||
| --color-button-primary-background-hover: rgb(from var(--spectrum-white) r g b / 94%); | ||
| --color-button-primary-background-disabled: rgb(from var(--spectrum-white) r g b / 11%); | ||
| --color-text-button-primary: var(--spectrum-gray-25); |
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'm not going to make a million comments about cleaning up your variable names, I think you probably get it.
styles/styles.css
Outdated
| } | ||
| } | ||
|
|
||
| .button--outline { |
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.
Can we rename the button themes to match Spectrum?
https://opensource.adobe.com/spectrum-css/?path=/docs/components-button--docs
Accent, Primary, Static Black, Static White
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.
With the Primary having Filled and Outline variants, they should now be as follows:
- primary
- primary-outline
- accent
- static-black (added)
- static-white (added)
- ghost
styles/base.css
Outdated
| --spectrum-blue-500: rgb(142 185 252); | ||
| --spectrum-blue-800: rgb(75 117 255); | ||
| --spectrum-blue-900: rgb(59 99 251); | ||
| --spectrum-blue-1000: rgb(39, 77, 234); |
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.
Added a missing color from S2 feature branch
5e7e2e6 to
c801b7b
Compare
catheraaine
left a comment
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.
Superb work, and the documentation looks great, too!
Summary of changes
Relevant Links
Test URLs:
Checklist
Validation
flex-direction: columnon mobile screens,flex-direction: rowon screens larger than tablet)a. are
<a>elements with button classes appliedb. have default, hover, and focus states
button--primarytobutton--primary-outline,button--accent,button--static-black,button--static-white, andbutton--ghostthrough the dev console to see how the button styles look on<button>elementsBrowser Testing
We should aim to support the latest version of the listed browsers. For older versions or other browsers not on the list, content should be accessible, even if it doesn't completely match the designs.
Developers should test as they work in the browsers available on their machines. If they have access to other devices to test other browser/OS combinations, they should do that when possible.
Windows
MacOS
Android
iOS