-
Notifications
You must be signed in to change notification settings - Fork 3
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/pxweb2 63 add global breakpoint tokens #74
Feature/pxweb2 63 add global breakpoint tokens #74
Conversation
Since we need to control the layout for different sized screens and such, we need the breakpoints for the media queries. This commit adds the breakpoints to a file, and adds that to the style-dictionary build command. The same as how we define and use the Spacings. In this way we have 1 place where all the breakpoint values are set, and can change them or add to them later if needed.
Since we want to see the breakpoints working, this commit adds an example to the main app page. One thing to consider is that currently the breakpoint tokens are imported (@use) from the files that are generated in the ui lib, and not from inside the app itself. I am not sure if we want this, or to create another set of files inside the app's own folder, and import from there. This is very easy to add in our current implementation, just add another output file to the build.js in the lib.
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.
Looks good
Improves how the scss is imported. This commit adds the alias '$ui' to the pxweb2 app's vite config, which can be used to import from the pxweb2-ui lib in a cleaner way than traversing the filesystem with '../..'. Co-authored-by: Michael Pande <>
Deploying with Cloudflare Pages
|
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.
Looks good
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.
Looks good
Since we need to control the layout for different sized screens and such, we need the breakpoints for the media queries. This commit adds the breakpoints to a file, and adds that to the style-dictionary build command. The same as how we define and use the Spacings. In this way we have 1 place where all the breakpoint values are set, and can change them or add to them later if needed.
One thing to consider is that currently the breakpoint tokens are imported (@use) from the files that are generated in the ui lib, and not from inside the main app itself. I am not sure if we want this, or to create another set of files inside the app's own folder, and import from there. This is very easy to add in our current implementation, just add another output file to the build.js in the lib. And update the .gitignore if we don't want them committed to the repo.
Also added an example of the breakpoints working to the main app.