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

fix: added self-contained styles for alert component #123

Merged
merged 7 commits into from
Jul 3, 2019

Conversation

SaiShan
Copy link
Contributor

@SaiShan SaiShan commented Jun 21, 2019

Closes #97

This PR contains the self-contained styling for the alert component.
This PR is part of the larger task of making all components self-contained #136

@netlify
Copy link

netlify bot commented Jun 21, 2019

Deploy preview for fundamental-styles ready!

Built with commit 02b4f50

https://deploy-preview-123--fundamental-styles.netlify.com

Copy link
Contributor

@greg-a-smith greg-a-smith left a comment

Choose a reason for hiding this comment

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

Looks like there are multiple other CSS variables you could put into the ugly theme. Check the scss/components/alert.scss file for other uses.

@import "../scss/components/alert";
@import "../scss/components/link";
@import "../scss/core/elements";
@import "../scss/core/root";
Copy link
Contributor

Choose a reason for hiding this comment

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

Importing the entire core elements and root files is not what we want to do here. We need to find out what from these files is necessary to render alerts properly and bring those into the link class definitions -- either via common mixins or directly. The whole point of self-contained styles is not only bring along what is needed and not do the changes using elements.

Copy link
Contributor

@greg-a-smith greg-a-smith left a comment

Choose a reason for hiding this comment

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

There are a number of visual regression file changes. Is it possible to see what the differences are between the old and the new?

p {
margin-bottom: 0;
margin-top: 0;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Styles cannot be applied directly to elements (<p> in this case) as they can bleed into other components on the page.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@greg-a-smith Thank you for the review, will create a class for it to prevent the bleeding.

&:focus {
outline-style: dotted;
outline-width: 1px;
@include fd-var-color("outline-color", fd-color-state("hover", "action"), --fd-color-action-focus);
Copy link
Contributor

Choose a reason for hiding this comment

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

If all the changes in this file are needed, I would expect these to be part of the link component's PR. Once they are there, this PR can take advantage of those same styles.

Copy link
Contributor

@greg-a-smith greg-a-smith left a comment

Choose a reason for hiding this comment

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

Assuming the build passes, this looks good. 🚢

@SaiShan SaiShan merged commit 4c2a710 into master Jul 3, 2019
@SaiShan SaiShan deleted the fix/self-contained-alert branch July 3, 2019 12:57
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.

Self-contained styles for Alert
3 participants