A previous coding challenge from tbk Creative aimed towards front-end developers.
Entailed building a mock popover featuring a parallax effect, accessibility features, and session data storage.
See the demo in action on GitHub Pages here.
- Take the Photoshop file of the photo above and implement the design as a mobile-responsive popover.
- CSS preprocessors and JS frameworks/libraries are permitted.
- With regards to the popover:
- Account for all breakpoints between desktop (1200px) and mobile (320px) resolutions.
- Popover is to display after a visitor has been on the website for 3 seconds.
- Ensure the popover and form are web accessible following AODA/WCAG standards.
- Must be able to navigate and close the popover via keyboard.
- If the popover is closed, it should not redeploy on subsequent page reloads/views.
- When the user scrolls downward, the shavings need to fall slowly while the chisel needs to move upwards.
- Relying on online .psd to HTML converters gave me page slices of varying quality.
- One site gave me a version where the shapes at the top/bottom of the popover were solid instead of hollow.
- Stacking elements can result in
z-index
issues with nested elements. - Lower half of popover required a
clearfix
as the shaving was positioned directly above it with thefloat: right
property. - Chrome Inspector did not properly respect media breakpoints before adding the meta viewport tag.
- Firefox did not properly calculate document height via
jQuery.offset()
and would add the container'sbottom: 400px
property whereas Chrome and Edge did not. - Figuring out how to do custom checkboxes, bullet points, and scaling backgrounds.
- MSDN - The Stacking Context - Useful for understanding z-index stacking rules
- W3C Custom Checkboxes - Involves wrapping an input field around its label and the
::after
pseudo-element - StackOverflow - Is localStorage availabie? - Directly applicable to session storage too
- BrowserStack - Reponsive Background Images - Fixed issue when content height was larger than background image and creating white space.