You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To start implementing components with responsive styled through media queries, a basic setup must be created based on the “Responsive Web Design” design concept.
Media Query Generator
To simplify the usage of media queries with styled-components, a utility function to generate media templates will be implemented. It'll use the min-width parameter to fulfill the used mobile-first approach. The base size that'll be used has been implemented as theme property in #54.
Initial Media Queries
Always adjust media queries to the content individually and not vice-versa.
The design supports the content. Not the other way around.
Like documented in the #52, Nord Docs uses the mobile-first pattern and follows the great “Google Developer Responsive Web Design” guidelines. The recommended way is to create media queries not based on any device sizes but individually based on the content which is unique for each project. This is the best practice and, contrary to most popular CSS framework like Bootstrap, the correct way since each site is different and there are thousands of devices and in the future new sizes will appear.
The first media query template will define the smallest min-width.
Tasks
Implement generateMediaQuery media query generator function.
Initially implement the first media query template for the smallest min-width.
The text was updated successfully, but these errors were encountered:
| Always adjust media queries to the content individually and not vice-versa.
| The design supports the content. Not the other way around.
Like documented in the GH-52, Nord Docs uses the mobile-first pattern
and follows the great "Google Developer Responsive Web Design
guidelines (1). The recommended way is to create media queries not based
on any device sizes but individually based on the content which is
unique for each project. This is the best practice and, contrary to most
popular CSS framework like Bootstrap, the correct way since each site is
different and there are thousands of devices and in the future new sizes
will appear.
Therefore, this commit includes the initial media query template
functions that define the smallest `min-width` query `base` (`<320px`)
and `minimal` (`>=320px`).
References:
(1) https://developers.google.com/web/fundamentals/design-and-ux/responsive
Associated epic: GH-52GH-61
To start implementing components with responsive styled through media queries, a basic setup must be created based on the “Responsive Web Design” design concept.
Media Query Generator
To simplify the usage of media queries with styled-components, a utility function to generate media templates will be implemented. It'll use the
min-width
parameter to fulfill the used mobile-first approach. The base size that'll be used has been implemented as theme property in #54.Initial Media Queries
Like documented in the #52, Nord Docs uses the mobile-first pattern and follows the great “Google Developer Responsive Web Design” guidelines. The recommended way is to create media queries not based on any device sizes but individually based on the content which is unique for each project. This is the best practice and, contrary to most popular CSS framework like Bootstrap, the correct way since each site is different and there are thousands of devices and in the future new sizes will appear.
The first media query template will define the smallest
min-width
.Tasks
generateMediaQuery
media query generator function.min-width
.The text was updated successfully, but these errors were encountered: