Files
freeCodeCamp/client/src/pages/certification.css
Raquel Amorim d96bff4428 fix(client): Fix print media queries for certificate (#46969)
* fix: add print media queries for certificate

* adjustments to printable certificate

* adjustments on margins and landscape printing

* adjustments
2022-08-15 16:46:46 +03:00

316 lines
5.7 KiB
CSS

@font-face {
font-family: 'Sax Mono';
src: url('/fonts/saxmono.ttf') format('truetype');
font-display: fallback;
}
.certification-namespace * {
margin: 0;
padding: 0;
}
.certification-namespace h1 {
margin: 12px 0;
}
.certification-namespace {
max-width: 1500px;
width: 100%;
padding: 30px;
border: var(--theme-color) 15px solid;
border-radius: 3px;
background-color: var(--gray-00);
}
.certification-namespace .row {
margin: 0;
}
.certification-namespace .col-sm-12 {
padding: 0;
}
.certification-namespace.certificate-wrapper {
font-family: 'Sax Mono', monospace;
}
/* center the certificate vertically */
.certificate-outer-wrapper {
display: flex;
align-items: center;
min-height: 100vh;
flex-direction: column;
}
.certificate-outer-wrapper .donation-section hr {
border: 1px solid var(--gray-10);
}
.certificate-outer-wrapper .donation-completion .btn {
background-color: var(--gray-15);
border-color: var(--gray-85);
color: var(--gray-85);
}
.certificate-outer-wrapper .donation-completion .btn:hover {
border-color: var(--gray-85);
background-color: var(--gray-85);
color: var(--gray-05);
}
.certificate-outer-wrapper .donation-completion .btn[disabled],
.certificate-outer-wrapper .donation-completion .btn[disabled]:hover {
background-color: var(--gray-15);
border-color: var(--quaternary-color);
color: var(--quaternary-color);
}
.certificate-outer-wrapper .donation-section,
.certificate-outer-wrapper .donation-section p {
font-family: 'Lato', sans-serif;
}
.certification-namespace header {
width: 100%;
height: 140px;
background-color: var(--theme-color);
position: relative;
}
.certification-namespace .logo {
display: flex;
align-items: center;
height: 140px;
margin-left: 100px;
}
.certification-namespace .logo svg {
height: 100%;
width: 100%;
max-width: 500px;
}
.certification-namespace .issue-date {
line-height: 140px;
font-size: 20px;
text-align: right;
margin-right: 100px;
color: var(--gray-00);
}
.certification-namespace .issue-date strong {
color: var(--gray-00);
}
.certification-namespace .information {
height: 380px;
text-align: center;
background-color: var(--gray-05);
}
.certification-namespace .information-container {
position: relative;
top: 50%;
transform: translateY(-50%);
margin: 0px 100px;
}
.certification-namespace p {
margin: 0;
}
.certification-namespace h3 {
font-size: 25px;
font-weight: normal;
}
.certification-namespace h4 {
margin-top: 25px;
font-size: 20px;
}
.certification-namespace h1 {
font-size: 40px;
color: var(--theme-color);
}
.certification-namespace .signatures {
text-align: center;
margin: 0 auto;
background-color: var(--gray-05);
}
.certification-namespace .signatures img {
max-width: 300px;
width: 100%;
margin: 0 auto;
}
.certification-namespace .signatures p {
font-size: 18px;
padding-top: 10px;
}
.certification-namespace .verify {
padding: 30px 0;
font-size: 15px;
text-align: center;
word-wrap: break-word;
background-color: var(--gray-05);
}
.certificate-outer-wrapper {
margin-top: calc(-1 * var(--header-height));
}
/*mobile media queries*/
@media screen and (max-width: 675px) {
.certification-namespaces.issue-date {
padding: 0;
border: 0;
}
.certification-namespace header {
height: 190px;
}
.certification-namespace h3 {
font-size: 15px;
}
.certification-namespace h1 {
font-size: 17px;
}
.certification-namespace h4 {
font-size: 15px;
margin-top: 20px;
}
}
@media screen and (max-width: 992px) {
.certification-namespace header {
height: 160px;
}
.certification-namespace .logo {
margin-left: 0;
padding: 20px;
justify-content: center;
height: 80px;
}
.certification-namespace .logo svg {
margin-top: 20px;
}
.certification-namespace .issue-date {
margin-top: 10px;
margin-right: 0;
text-align: center;
line-height: 0px;
word-wrap: break-word;
}
.certification-namespace .issue-date strong {
display: block;
margin-top: 15px;
line-height: 25px;
}
.certification-namespace .information {
height: 300px;
}
.certification-namespace .information-container {
margin: 0px 15px;
text-align: center;
word-wrap: break-word;
}
.certification-namespace h3 {
font-size: 25px;
}
.certification-namespace h1 {
font-size: 28px;
}
}
@media screen and (max-width: 675px) {
.certification-namespaces.issue-date {
padding: 0;
border: 0;
}
.certification-namespace header {
height: 190px;
}
.certification-namespace h3 {
font-size: 15px;
}
.certification-namespace h1 {
font-size: 17px;
}
.certification-namespace h4 {
font-size: 15px;
margin-top: 20px;
}
}
/* print media queries */
@media print {
body {
height: 210mm;
width: 297mm;
}
.certificate-outer-wrapper {
width: 100%;
margin: 0;
justify-content: center;
}
.certification-namespace {
border-color: var(--theme-color) !important;
}
.certificate-outer-wrapper header {
-webkit-print-color-adjust: exact !important;
color-adjust: exact !important;
background-color: var(--theme-color) !important;
display: flex;
align-items: center;
justify-content: space-around;
}
.certification-namespace h3 {
font-size: 25px;
}
.certification-namespace h1 {
font-size: 28px;
}
.certification-namespace .issue-date,
.certification-namespace .issue-date strong {
color: var(--gray-00) !important;
}
.certification-namespace .information {
height: 300px;
}
.certification-namespace .signatures img {
max-width: 300px !important;
}
.row.certificate-links,
.donation-section {
display: none;
}
}