diff --git a/packages/common/src/scss/_print.scss b/packages/common/src/scss/_print.scss new file mode 100644 index 00000000..19b20bd6 --- /dev/null +++ b/packages/common/src/scss/_print.scss @@ -0,0 +1,52 @@ +@media print { + // page setup + @page { + size: legal portrait; + } + @page :left { + margin-left: 0.5in; + } + @page :right { + margin-right: 0.5in; + } + + // style adaptations + *, + *:before, + *:after, + *:first-letter, + p:first-line, + div:first-line, + blockquote:first-line, + li:first-line { + background: transparent !important; + color: #000 !important; /* Black prints faster: + http://www.sanbeiji.com/archives/953 */ + box-shadow: none !important; + text-shadow: none !important; + } + + h1, + h2, + h3, + h4, + h5 { + page-break-after: avoid; + } + table, + figure { + page-break-inside: avoid; + } + main { + a[href]:after { + content: ' (' attr(href) ')'; + } + + abbr[title]:after { + content: ' (' attr(title) ')'; + } + } + .container { + @apply max-w-none px-0; + } +} diff --git a/packages/common/src/scss/components/_BlockKeyPoints.scss b/packages/common/src/scss/components/_BlockKeyPoints.scss index c41d0f7b..b85c0a62 100644 --- a/packages/common/src/scss/components/_BlockKeyPoints.scss +++ b/packages/common/src/scss/components/_BlockKeyPoints.scss @@ -1,29 +1,32 @@ .BlockKeyPoints { - ul li { - &::before { - @apply bg-primary; - @apply inline-block; - @apply relative; - @apply mr-4; - @apply shrink-0; - @apply mt-3; + @media not print { + ul li { + &::before { + @apply bg-primary; + @apply inline-block; + @apply relative; + @apply mr-4; + @apply shrink-0; + @apply mt-3; + @apply print:hidden; - content: ''; - width: 30px; - height: 2px; - vertical-align: middle; - } - - .BlockText { - p { - @apply mb-2; + content: ''; + width: 30px; + height: 2px; + vertical-align: middle; + } - @screen lg { + .BlockText { + p { @apply mb-2; - } - &:last-child { - @apply mb-0; + @screen lg { + @apply mb-2; + } + + &:last-child { + @apply mb-0; + } } } } diff --git a/packages/common/src/scss/styles.scss b/packages/common/src/scss/styles.scss index 608c968d..4033415f 100644 --- a/packages/common/src/scss/styles.scss +++ b/packages/common/src/scss/styles.scss @@ -24,3 +24,6 @@ // components @import 'components'; + +// print styles +@import 'print'; diff --git a/packages/vue/src/components/BaseButton/BaseButton.vue b/packages/vue/src/components/BaseButton/BaseButton.vue index 072b0179..def78f93 100644 --- a/packages/vue/src/components/BaseButton/BaseButton.vue +++ b/packages/vue/src/components/BaseButton/BaseButton.vue @@ -94,7 +94,7 @@ export default defineComponent({