Skip to content

Commit

Permalink
Fix style issue that broke prting in latest vue version
Browse files Browse the repository at this point in the history
  • Loading branch information
danielgarthur committed Apr 18, 2024
1 parent c545c53 commit 4d2d4d7
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/components/Editor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6228,6 +6228,14 @@ export default class Editor extends Vue {
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style>
@media print {
body * {
visibility: hidden;
overflow: visible !important;
}
}
</style>
<style scoped>
.loading-overlay {
position: absolute;
Expand Down Expand Up @@ -6537,11 +6545,6 @@ export default class Editor extends Vue {
}
@media print {
body * {
visibility: hidden;
overflow: visible !important;
}
.page,
.page * {
visibility: visible;
Expand Down

2 comments on commit 4d2d4d7

@danielgarthur
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixes the root cause of #634 so that dependencies can be updated again.

In Vue 3.4.23, the CSS generation for scoped styling changed. Below is the generated CSS in both Vue versions. The previous Vue version is on the left, and the new Vue version is on the right.
vue broken

This makes clear the true issue, which is that a component's scoped style section should not contain elements that are not in the component (in this case, body).

@basil
Copy link
Member

@basil basil commented on 4d2d4d7 Apr 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.