Addressing Viewport Challenges in Web Components #1307
thejfreitas
started this conversation in
Ideas
Replies: 1 comment 2 replies
-
This has been at the back of my head for a little while, so I'm glad you brought it up 😄 The reason we didn't use the same mixin as in fozzie was because the tool we used hadn't upgraded to dart-sass syntax at the time – but it has now. The package is called include-media and handles media queries in the same way as fozzie does – it's a really elegant approach, so would be cool to integrate it into our components again for media queries and breakpoint handling. If you're happy with that, I'll look to make a ticket for us to look at doing that shortly? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am reaching out to discuss a challenge we've encountered in our Web Components projects related to viewport handling, particularly when dealing with components that exhibit different formats on narrow screens.
In the Pie Notification component we have the option to stack action buttons, however the design docs say to allow stacking these buttons only on narrow screens: https://www.figma.com/file/pPSC73rPin4csb8DiK1CRr/branch/r96WaDE105zDbe5itnleVv/%E2%9C%A8-%5BCore%5D-Web-Components-%5BPIE-3%5D?node-id=3119%3A77568&mode=dev
In the moment that I wrote this topic in our codebase I saw that we have some
mixins
coming fromfoozie
but these are only available onpie-docs
.Also in the web components we already have some using viewports but with different breakpoints:
I was wondering if we could think of a solution to set proper viewports values so then we can create util functions/mixins to standardise breakpoints and guarantee consistency on different design requirements.
I like the values defined by Tailwind CSS for their viewports, it might be a nice inspiration if we all agree to build some kind of util function set: https://tailwindcss.com/docs/responsive-design
Also I liked how
foozie
implements these mixins and I think this is a very clever way to handle this.Share your thoughts! Have you faced similar challenges, and how did you handle them?
Beta Was this translation helpful? Give feedback.
All reactions