canonical / canonical/vanilla-framework
Adding breakpoint helpers
- Dominant language
- HTML
- Stars
- 983
- Forks
- 216
- Avg merge
- 3d 13h
- Merged PRs (30d)
- 3
Description
During the migration to Vanilla 3 on Juju dashboard I had an issue where the breakpoint medium doesn't exist anymore, I had an option to manually define the breakpoint medium but I feel that it's fighting against the flow of the Vanilla lib so instead I decided to follow the docs and use a media selector that does this `mobile < ... < large`.
That made my SCSS code somewhat unreadable easily by others so during my research on fixing, I stumbled across this article: https://css-tricks.com/approaches-media-queries-sass and I found this one easy to write/use/read: [Landon Schropp’s technique](https://css-tricks.com/approaches-media-queries-sass/#aa-landon-schropps-technique).
Here is how our solution look like: https://github.com/canonical/jaas-dashboard/blob/05c9737e7251e77df8583ac4dffefbf7466c5b4f/src/scss/_breakpoints.scss
It maybe worth it to add this in the Vanilla library!
Contributor guide
Research direction
Start by comparing the linked jaas-dashboard src/scss/_breakpoints.scss implementation with the Vanilla documentation and the linked Sass technique. Determine how breakpoint helpers could fit Vanilla 3 without restoring the removed medium breakpoint. Done means the proposed helper API is integrated into the library and its behavior is covered by the project’s existing checks.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- sass
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100