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

Contact class lacks enough specificity #456

Open
SteelWagstaff opened this issue Jul 18, 2024 · 1 comment
Open

Contact class lacks enough specificity #456

SteelWagstaff opened this issue Jul 18, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@SteelWagstaff
Copy link
Member

SteelWagstaff commented Jul 18, 2024

The CSS for Aldine has a rule that targets the .contact class in order to style the contact form designed to go on the home page:

.contact {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
width: 100%;
padding: rem(65) 0 rem(120);
background: var(--body-bg-alt);

If a user creates a page with the title (& permalink) of 'Contact' the body element for the page itself also receives a .contact class, resulting in flex styling and padding being applied to the page. It can be overridden, but a better solution would be to add additional specification to the .contact class designed to target just the contact form and not other elements which may happen to have this class applied. I recommend using #page

@SteelWagstaff
Copy link
Member Author

@cmurtagh and @tw77 -- this came up in our support checkin today. I've submitted a PR that I think should fix it by adding an additional selector to the rule which targets the .contact class: #457. The CSS workaround was simply to apply something like:

body.contact {
	align-items: normal;
	padding: 0;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants