Skip to content
This repository has been archived by the owner on Aug 29, 2022. It is now read-only.

styling updates #50

Merged
merged 20 commits into from
Aug 5, 2021
Merged

styling updates #50

merged 20 commits into from
Aug 5, 2021

Conversation

michellexliu
Copy link
Collaborator

  • Added _ to .scss file names
  • Re-factored styling_classnames file into @extend in sass
  • Updated spacing (decreased padding between buttons by 1 token, fixed focus state margin issues, decreased margins between checkboxes by 1 token, smaller line spacing for title, more space between header & body text)
  • Added drop shadow on module

@github-actions
Copy link

github-actions bot commented Aug 2, 2021

Azure Static Web Apps: Your stage site is ready! Visit it here: https://salmon-moss-01b532c0f-50.eastus2.azurestaticapps.net

@@ -65,15 +64,15 @@ export const TRANSLATIONS_EN = {
title:
"Thank you for your feedback! It has been submitted.<br /><br />Your feedback is anonymous and confidential, so you will not receive a reply.",
plainText:
"The City of New York is always trying to improve its services. Are you interesed in being a user research participant? This is is entirely voluntary and you can opt out at any time. Signing up to be a user research participant will have no impact on your feedback today, or your eligibility to access or receive services in the future.",
"<p>The City of New York is always trying to improve its services. Are you interesed in being a user research participant? This is is entirely voluntary and you can opt out at any time. Signing up to be a user research participant will have no impact on your feedback today, or your eligibility to access or receive services in the future.</p>",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Are we sure we want paragraph tags inside the translation files? I don't know if that would be considered best practice because it could interfere with the actual translation that goes on

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah, I thought about this too, but I'm just not sure how else to customize the spacing between each paragraph of the body text (since design pointed out that there should be more spacing between each paragraph, but still keep it less than the spacing between the title and paragraph). I had considered just adding in another <br />, but we can't really customize how large that space is. I think another option would be to make the plainText an array, and then in Module.js map each piece of text into a <p> tag with our desired padding— not sure if this would be over-complicating things for our current purposes; it could become necessary if we ever end up having even more paragraphs per section in the future though. What do you think?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think we may want to find another solution. Additionally I don't know if we necessarily want
within our translations files either. Maybe something we should ask Rapi about.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah, I definitely agree that we should ask Rapi about this. Which part are you referring to in your second sentence?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Sorry I meant line breaks within the files either

<p
className={`${H1_WHITE_STYLE} ${dir === "rtl" && "text-right"}`}
className="font-sans-md2 feedback-h1 feedback-h1--light"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we need both "feedback-h1 and feedback-h1--light"? Isn't the purpose of using extends for --light so that it automatically inherits the styles from feedback-h1?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'd considered just using feedback-h1--light, but according to the official BEM docs, we should keep in the original class and add the new one separately (see http://getbem.com/naming/ Modifier section).

p {
@extend .margin-0;
}
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

If two classes share a lot of styling in common can one of them extend the other so we don't have so much repetition within this file?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Hmmm the thing with that is that if we have one extend the other it would extend all of the styling from the other (if we're also considering the uswds classes, it'd also extend the default uswds styling for one of those classes as well, that we didn't set). I think maybe an option to handle the common styling would be to use grouping selectors and move all the common styles in there?

For example

.usa-label, .usa-checkbox, .feedback-h1, etc {
@extend .text-bold, .text-primary;
}

What do you think?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes I think that makes sense, I think we should do that

…s in order to avoid setting mobile-lg- and mobile-lg\: repeatedly
@github-actions
Copy link

github-actions bot commented Aug 3, 2021

Azure Static Web Apps: Your stage site is ready! Visit it here: https://salmon-moss-01b532c0f-50.eastus2.azurestaticapps.net

ksiegel1923 and others added 2 commits August 3, 2021 12:39
changed header logo from a png to an svg (help with resolution)
added extra margin and padding to header logo so visually it appears centered
…es folder in case we want to support multiple themes for stretch goal, split components into different files for improved modularity
@github-actions
Copy link

github-actions bot commented Aug 3, 2021

Azure Static Web Apps: Your stage site is ready! Visit it here: https://salmon-moss-01b532c0f-50.eastus2.azurestaticapps.net

@michellexliu michellexliu reopened this Aug 3, 2021
@github-actions
Copy link

github-actions bot commented Aug 3, 2021

Azure Static Web Apps: Your stage site is ready! Visit it here: https://salmon-moss-01b532c0f-50.eastus2.azurestaticapps.net

1 similar comment
@github-actions
Copy link

github-actions bot commented Aug 3, 2021

Azure Static Web Apps: Your stage site is ready! Visit it here: https://salmon-moss-01b532c0f-50.eastus2.azurestaticapps.net

@github-actions
Copy link

github-actions bot commented Aug 4, 2021

Azure Static Web Apps: Your stage site is ready! Visit it here: https://salmon-moss-01b532c0f-50.eastus2.azurestaticapps.net

@github-actions
Copy link

github-actions bot commented Aug 4, 2021

Azure Static Web Apps: Your stage site is ready! Visit it here: https://salmon-moss-01b532c0f-50.eastus2.azurestaticapps.net

@github-actions
Copy link

github-actions bot commented Aug 4, 2021

Azure Static Web Apps: Your stage site is ready! Visit it here: https://salmon-moss-01b532c0f-50.eastus2.azurestaticapps.net

@ksiegel1923 ksiegel1923 merged commit 2a510d4 into dev Aug 5, 2021
@michellexliu michellexliu deleted the story/sass-refactor branch August 6, 2021 13:45
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

No JS files in Assets Add an underscore for SASS files that are being imported and is not the main scss
2 participants