Skip to content
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

Update unstyled button and list to BEM #2974

Merged
merged 17 commits into from Mar 20, 2019
Merged

Conversation

thisisdano
Copy link
Member

@thisisdano thisisdano commented Mar 20, 2019

Unstyled button preview
Unstyled list preview


  • Changed .usa-button-unstyled to .usa-button.usa-button--unstyled as the unstyled button variant
  • Added unstyled button to example code
  • Changed .usa-unstyled-list to .usa-list.usa-list--unstyled as the unstyled list variant
  • Added unstyled list to example code
  • Updated Footer big component

Screen Shot 2019-03-20 at 9 16 28 AM

Screen Shot 2019-03-20 at 9 16 43 AM


Fixes #2956

@thisisdano thisisdano requested a review from a team March 20, 2019 16:28
@thisisdano thisisdano added the 2.0 label Mar 20, 2019
@thisisdano thisisdano requested a review from maya March 20, 2019 16:30
.usa-button--secondary {
&.usa-button--unstyled {
@include button-unstyled;
}
Copy link
Contributor

@maya maya Mar 20, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is it necessary to add the variant button classes before .usa-button--unstyled in the CSS? It looks like it works without this and keeps the CSS much smaller and shallower.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was defensive specificity, but I suppose we could remove it

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, it does fix some specificity stuff around hover/active/focus

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not able to reproduce when I check the button states? Is there something else I should do to see the issue?

Copy link
Contributor

@maya maya Mar 20, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see one issue with the outline button on hover but can probably be resolved individually by removing the border.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you want to resolve those issues individually, chain only those classes, or chain all classes (even if most don't need it)?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm inclined to leave it as is and apply the specificity across the board, if only to make it clear that the unstyled variant should always override any other variant styling. But I don't feel super strongly about this.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Made a few tweaks to the mixin in #2976 to make it more robust and fix these two issues. If that looks OK, we can merge it in.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@maya
Copy link
Contributor

maya commented Mar 20, 2019

I assume this is OK, but noticed the text on the unstyled big button is also large.

Screen Shot 2019-03-20 at 10 43 35 AM

@thisisdano
Copy link
Member Author

That was intentional, but maybe it shouldn't be?

@thisisdano
Copy link
Member Author

As for hover issues — I see it in the outline and accent-cool variants. The outline version gets an outline, and the accent-cool version changes smoothing modes.

@maya maya merged commit e3b93f9 into release-2.0 Mar 20, 2019
@maya maya deleted the dw-update-unstyled-classes branch March 20, 2019 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants