-
Notifications
You must be signed in to change notification settings - Fork 1
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
Feature/background component #93
Conversation
… ratio, refractored code to work by just dropping in the children props
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.
<div className="Background"> | ||
<div className="Background__gradient"></div> | ||
<div className="Background__children">{children}</div> | ||
<Wire className="Background__wire"></Wire> | ||
<Rainbow className="Background__wire--variant"></Rainbow> | ||
</div> |
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 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.
Yup! It's meant to work with 7 sections.
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.
This looks amazing with more sections added in!
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.
cool progress so far! let's flush out further details with Calum tomorrow during the meeting
@@ -0,0 +1,40 @@ | |||
@use "~stylesheets/typography"; | |||
|
|||
.Background { |
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.
I suggest adding something along the lines of height: 3000px
to create some negative space to work with while everyone stages each section. we'll drop the fixed height as new sections are developed to occupy the space
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.
Could we even do 7000px
for each of the supposed 7 sections?
} | ||
|
||
&__gradient { | ||
z-index: -500; |
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 have less variance in z-indexing to keep everyone sane. I recommend keeping things linear (-1, -2, -3, etc) so the layering is always obvious
&__wire { | ||
z-index: -1; | ||
position: absolute; | ||
width: 100%; | ||
bottom: calc(100% / 7 * 3); | ||
|
||
&--variant { | ||
position: absolute; | ||
width: 100%; | ||
bottom: 0; | ||
} | ||
} | ||
|
||
&__children { | ||
z-index: 999; | ||
position: relative; | ||
} | ||
|
||
&__gradient { | ||
z-index: -2; | ||
position: absolute; | ||
background: linear-gradient( | ||
180deg, | ||
var(--blue) 0%, | ||
var(--blue__gradient) 100% | ||
); | ||
width: 100%; | ||
height: calc(100% / 7 * 3); | ||
bottom: 0; |
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.
Do you think we could rearrange the SCSS to replicate the structure of the HTML? It'll just make things easier to understand.
} | ||
|
||
&__children { | ||
z-index: 999; |
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.
Can we also change to to something more realistic? Like 0 or 1? My components have z-indices too, but I'm not sure how that might clash.
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.
Everything looks good to me! I love the absolute/relative positioning magic - great job @PriyaRajarathinam !
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.
I think the background is ready for staging! let's get this into main
& go from there..
* Merging main to branch * Updated scaling on images and made rendering children more dynamic * Fixed formatting for linter * removed unused css class * fixed linting error * Upgraded react import statement * Updated variable names, added new line to svg, removed presrve aspect ratio, refractored code to work by just dropping in the children props * fixed lint issue * removed comments from hero.scss * updated rainbow path svg * added 3000px background and changed z-indices Co-authored-by: Priya Rajarathinam <cat@jjjjjjj.attlocal.net>
* Merging main to branch * Updated scaling on images and made rendering children more dynamic * Fixed formatting for linter * removed unused css class * fixed linting error * Upgraded react import statement * Updated variable names, added new line to svg, removed presrve aspect ratio, refractored code to work by just dropping in the children props * fixed lint issue * removed comments from hero.scss * updated rainbow path svg * added 3000px background and changed z-indices Co-authored-by: Priya Rajarathinam <cat@jjjjjjj.attlocal.net>
Problem
As an engineer, I want a baseline background for cross-sectional components.
Link to Asana Ticket
Solution
I implemented a Background component that creates an overarching background for the sections. There is a separate background for Sections 1-4 and a separate background for Sections 5-7. Sections 1-4 have the basic background with a blue wire frame and Sections 5-7 have a gradient background with a rainbow wire frame.
Change summary:
Steps to Verify:
Screenshots (optional):
Show-n-tell images/animations here