Greetings I have project that using vuejs and bootstrap-vue-3. I want possibility to user print data about company. So I created print scss for that. And also made the styles. I have problem the radio buttons are not filled then I want print the webpage
How it looks like then I want print the page As you can see(arrows are pointing to) the radio buttons are not filled.
How it looks like in inspector and in code
<form-group
:validator="v$.form.companyType"
label="Company Type"
v-if="!isUserParentCompanyAdmin"
>
<b-form-radio-group
v-model="form.companyType"
:options="companyTypes"
/>
</form-group>
If you check vue bootstrap docs page the filling working there.
So the problem was/is that in project I am using bootstrap scss not css. In scss you do not have specific style (-webkit-print-color-adjust: exact;) what is on css so printing of radio buttons can not be done.
How to fix the problem: Two ways
I am using Vitejs so you can use autoprefixer this package is adding properties needed for browsers like mention before on postcss thingy.
Manually add to @ media print needed property
.form-check-input:checked[type=radio] {
-webkit-print-color-adjust: exact; /* Chrome, Safari 6 – 15.3, Edge */
print-color-adjust: exact; /* Firefox 97+, Safari 15.4+ */
}