-
-
Notifications
You must be signed in to change notification settings - Fork 20
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
Add some css decorations #38
Add some css decorations #38
Conversation
I'll take a look at this tonight and provide my feedback. But may I please ask that you do not implement a git commit message style that we do not intend to follow. It'll make the history look out-of-place if some message follow some sort of style and others do not. As I stated before, we're not planning to adhere to any kind of message style for this project as the overhead does not provide us with any benefits. P.S. I hope you don't think contributing to us is a "chore"! 🤣 |
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.
Generally, I think the style changes are good.
- I like the new grid, the removal of the SVG assets, and the extra wave.
- I like dropping the containing box around the library cards.
What I would like to see changed:
- Remove the animation on the hover of "Scroll to Learn More."
- Remove the all hover states on the library cards. I think they fit the style of the entire website uncontained.
Bugs:
- Please check the site in responsive sizes. There is currently a horizontal scroll. It looks likely due to the width of the buttons in the library cards.
Another Notes:
- As mentioned in the code comments, it doesn't look like the changes went through our stylelinter. Please run
npm run lint
to find errors in our rules. I'll be working on adding that to the pipeline next so we can enforce consistent code.
components/Header/Header.module.scss
Outdated
padding: 1.5rem; | ||
background-color: hsl(var(--secondary-color)); |
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.
It looks like you may not have had the stylelint plugin working when making these changes. A lot of rules are arbitrarily reordered when they should be alphabetical. Please make sure everything is passing npm run lint
before committing. I'll get a pipeline job in place to address this shortly.
components/Header/Header.module.scss
Outdated
|
||
.wordmark { | ||
display: none; | ||
} | ||
|
||
.monogram { | ||
width: 35px; | ||
width: 2.1875rem; |
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.
Is there a reason you converted many px
values to rem
? There's very specific places where px
are preferred, namely around graphic sizing which, in this example, is the case. I'd prefer to see px
to remain in px
unless it directly affects font-size.
components/Header/Header.module.scss
Outdated
|
||
& :not(:last-child) { | ||
border-bottom: 1px solid hsl(var(--light-grey)); | ||
border-bottom: thin solid hsl(var(--light-grey)); |
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.
No, please use exact values.
components/Hero/Hero.module.scss
Outdated
@media only screen and (max-width: $mobile-width) { | ||
section:not(.full) { | ||
background-position: 0 2rem; | ||
@media ($mobile-width >= width) { |
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.
Please leave the media queries as they were written.
components/Hero/Hero.tsx
Outdated
|
||
'&:hover': { | ||
letterSpacing: 1.1, | ||
}, |
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.
Please revert this change.
font: { | ||
size: 2.5rem; | ||
weight: 600; | ||
} |
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.
While I appreciate the ability to nest rules in this way, it makes using automatic alphabetizing more difficult and I would prefer we do not do this.
z-index: 1; | ||
width: 100%; | ||
height: 6.25rem; | ||
background-color: hsl(var(--primary-color) / 100%); |
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.
The 100%
isn't necessary here.
} | ||
} | ||
|
||
@media only screen and (max-width: $mobile-width) { | ||
@media (46rem >=width) { |
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.
No magic numbers please. Where is 46rem
coming from?
@@ -32,13 +43,14 @@ | |||
.image { | |||
position: relative; | |||
width: 100%; | |||
transition: all 0.25s linear; |
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.
Please remove this transition.
Good. Today I will make all the corrections. A few more wishes:
|
I agree, I will be creating these soon. Same for issues.
Our contributing information is linked in the README: https://pictogrammers.com/docs/contribute/website/. |
I meant something like |
Yep, the documentation needs to be expanded on. There's already an issue open for it. 😄 |
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's still some code changes that need to happen here. Once they're done, I will pull down the branch to do some manual testing before giving it the 👍🏼. There are also merge conflicts that need to be resolved.
backgroundColor: 'white', | ||
borderBottom: 'none', | ||
borderRadius: 24, |
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.
The pill shape of the button does not match any other button's style on the site, so let's remove this.
borderRadius: 24, |
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.
The site navigation and the "Scroll to Learn More" button have a more circular shape.
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.
Only on hover. The header follows that pattern to match the search box. The hero does it to match the header because of proximity. Neither area really "buttons." All elements that look like buttons should follow the Material guidelines as per the MUI <Button/>
component.
styles/pages/index.module.scss
Outdated
grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); | ||
justify-items: center; | ||
grid-gap: 3rem; | ||
grid-template-columns: repeat(auto-fit, minmax(var(--col-size), 1fr)); |
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.
Let's not use CSS variables here and be explicit here and in the media query. I get what you're doing here, but its just not a pattern we've done in this repo.
} | ||
|
||
.content { | ||
.image { | ||
position: relative; | ||
transition: all .2s linear; |
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.
Still need to remove this transition.
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.
Transition smoothes the behavior of the icon when hovering over the card.
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.
What I'm asking is to remove all transitions from those cards. Keep the style as you have proposed before hover, but make the buttons the only clickable areas. 😄
Co-authored-by: Michael Irigoyen <[email protected]>
Co-authored-by: Michael Irigoyen <[email protected]>
Co-authored-by: Michael Irigoyen <[email protected]>
Looks like it's done)
// variables.scss
// px
$tablet-width: 910px;
$mobile-width: 736px;
// but rem
$width-max: 96rem;
In general, I liked the work. I'll suggest more improvements over time if you don't mind. |
Definitely, we love suggestions, feedbacks, and PRs. My apologies about some of the inconsistencies in terms of Let's see if I can address/justify any of your concerns and see if we can find places for improvement.
|
Try to avoid odd numbers. You have probably noticed that many modern grids, fonts, and others use even values that are multiples of 4 (8, 12, 16, 24). The Material also uses these values. MUI used on this site is also built on this system. This will also be useful for the future margin/padding system. This applies to point 1 as well. Indents of 12, 16, 24, 32, 48, 56px and above are easier to use and easy to manipulate: 11px = 0.6875rem;
// vs
12px = 0.75rem; 33px = 2.0625rem;
// vs
32px = 2rem; or when creating variables/mixins: $base_px = 0.25rem;
$font_size = calc(#{$base_px} * 4); In the future, it will become easier to translate and navigate in |
What is the purpose of this pull request?
Description
I've added some dynamism to the main page and made some improvements to the code.
Checklist
LibraryCard's
;Before submitting the PR, please make sure you do the following
fixes #yyy
).