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

Add Card component #11

Merged
merged 2 commits into from
Jun 30, 2022

Conversation

xxArchitect
Copy link
Contributor

@xxArchitect xxArchitect commented Jun 7, 2022

Hey guys! Just finished the Card component. Please let me know if something needs to be fixed.

Issue: #6

@MathyouMB MathyouMB self-requested a review June 11, 2022 21:34
Copy link
Member

@MathyouMB MathyouMB left a comment

Choose a reason for hiding this comment

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

Aesthetically, this is almost perfect! I'd just adjust the read button to line up on the left side with the other text.

Screenshot 2022-06-15 at 6 10 50 PM

const { colour, title, description } = Astro.props;
---

<style define:vars={{ colour }}>
Copy link
Member

Choose a reason for hiding this comment

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

This is actually really interesting, I didn't consider how and if astro could handle passing code level variables to the style.

Copy link
Contributor Author

@xxArchitect xxArchitect Jun 15, 2022

Choose a reason for hiding this comment

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

Yeah, I was thinking how to set this up with as little hustle as possible and found this to be the fastest way to do so. Here is the link to Astro docs if you are interested.

Comment on lines 34 to 40
bottom: -5.5rem;
left: 2.5em;
width: 5.5em;
height: 2.5em;
font-size: medium;
border-radius: 5em;
border: 0em solid black;
Copy link
Member

Choose a reason for hiding this comment

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

Is there a reason why you use em instead of rem for most of the units?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure... I can fix it to have to rem instead of em.

}

h1, p, button {
position: relative;
Copy link
Member

@MathyouMB MathyouMB Jun 15, 2022

Choose a reason for hiding this comment

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

Instead of using position relative and super positioning everything using top, left, and right units I'd recommend using margin and padding. You'll save a lot of lines by having a padding of 1 rem.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Very good point! I will update it to use margins/padding instead of positioning.

@xxArchitect xxArchitect marked this pull request as draft June 15, 2022 22:44
@xxArchitect xxArchitect marked this pull request as ready for review June 15, 2022 23:19
@MathyouMB MathyouMB merged commit 4f44621 into CarletonComputerScienceSociety:master Jun 30, 2022
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.

2 participants