-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Screenshotting] PoC print media #126913
Closed
jloleysens
wants to merge
10
commits into
elastic:main
from
jloleysens:screenshotting/poc-print-media
Closed
[Screenshotting] PoC print media #126913
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
9cb28ec
filthy hackses to scope CSS to screen and projection
jloleysens 98dbc32
rather use a mutation observer
jloleysens b4996cf
rather use webpack
jloleysens 35aed7d
Revert "rather use webpack", style-loader has a bug for media attr
jloleysens 1767dea
got a way to scope styles to either screen or print media
jloleysens cd87b4b
Merge branch 'main' into screenshotting/poc-print-media
kibanamachine 6a197b3
Merge branch 'main' into screenshotting/poc-print-media
jloleysens 8ad3c5b
Merge branch 'main' into screenshotting/poc-print-media
kibanamachine bed1b10
Merge branch 'main' into screenshotting/poc-print-media
kibanamachine 86e2676
Merge branch 'main' into screenshotting/poc-print-media
kibanamachine File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
html { | ||
background-color: rgb(255, 0, 0); | ||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
The version of
style-loader
we are using has a known bug for setting themedia
attribute on style tags webpack-contrib/style-loader#458There 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.
This is a work-around that instead uses the
MutationObserver
hacked into core for updating media attributes based on the presence of thedata-print-media-style
. The result of this is the print styles "flash" once as they are applied by the browser until theMutationObserver
kicks in. Very hacky, but work-around for rather not updating style-loader + webpack to latest version.