-
Notifications
You must be signed in to change notification settings - Fork 590
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
handle viewport values for breakpoint preview #4748
handle viewport values for breakpoint preview #4748
Conversation
@@ -17,6 +17,7 @@ body[data-breakpoint-preview-mode] { | |||
} | |||
|
|||
[data-apos-refreshable] { | |||
position: relative; |
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.
absolute stuff are now correctly scoped
…ew-does-not-support-vhvw-units
…ew-does-not-support-vhvw-units
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.
@ETLaurent Did you check also if vh
units in vue files worked?
modules/@apostrophecms/asset/lib/webpack/postcss-replace-viewport-units-plugin.js
Outdated
Show resolved
Hide resolved
@haroun yes:
|
…ew-does-not-support-vhvw-units
* upstream/main: handle viewport values for breakpoint preview (apostrophecms#4748) Pro 6678 mobile preview dropdown (apostrophecms#4768) Fix menu focus (apostrophecms#4767) Update changelog for translations (apostrophecms#4766) [generate] Translate to German (apostrophecms#4759) [generate] Translate to Spanish (apostrophecms#4760) [generate] Translate to French (apostrophecms#4761) [generate] Translate to Italian (apostrophecms#4762) [generate] Translate to Portuguese (Brazil) (apostrophecms#4763) [generate] Translate to Slovak (apostrophecms#4764)
* feature-vite: sass import warning (#4776) PRO-6657: Following values for dynamic choices (#4770) Tests HMR triggers, refactor to async due to upcoming EMS changes warnDev now prefixes in the expected way (#4746) Pro 6666 page move setting page as modified (#4771) handle viewport values for breakpoint preview (#4748) Pro 6678 mobile preview dropdown (#4768) Fix menu focus (#4767) Update changelog for translations (#4766)
Summary
Use a custom
postcss
plugin to duplicate declarations containingvh
andvw
(and only those) and change the units to container query compatibles ones (cqh
,cqw
) into a rule prefixed by:where(body[data-device-preview-mode])
to take them into account only on breakpoint preview mode.Example: given I have the following CSS
I want to end up with the following CSS:
What are the specific steps to test this change?
For example:
What kind of change does this PR introduce?
(Check at least one)
Make sure the PR fulfills these requirements:
If adding a new feature without an already open issue, it's best to open a feature request issue first and wait for approval before working on it.
Other information: