-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
121 additions
and
0 deletions.
There are no files selected for viewing
119 changes: 119 additions & 0 deletions
119
source/wp-content/themes/wporg-showcase-2022/src/style/404.scss
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,119 @@ | ||
@import "breakpoints"; | ||
|
||
body.error404 { | ||
--oops-font-size: 47vw; // "Magic number" ala https://css-tricks.com/fitting-text-to-a-container/ | ||
|
||
.site-content-container { | ||
|
||
/* | ||
* Prevent "oops" from creating a horizontal scroll. | ||
* In some iOS versions, these rules also have to be applied to <html>, but that would bleed over to other | ||
* pages. It's better to just let there be a scroll, since it's not a commonly used page. | ||
*/ | ||
position: relative; // needed for overflow to work | ||
overflow: hidden; | ||
|
||
margin-top: 0; | ||
padding-left: var(--wp--custom--alignment--edge-spacing); | ||
padding-right: var(--wp--custom--alignment--edge-spacing); | ||
|
||
@include break-small() { | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: center; | ||
padding-top: 100px; | ||
padding-bottom: 100px; | ||
|
||
// Prevent the gap under the content container from growing too big. | ||
// The max will start cutting off the text after ~2500px, but that's an edge case. | ||
min-height: min(var(--oops-font-size), 975px); | ||
} | ||
} | ||
|
||
.error404__oops { | ||
z-index: -1; | ||
position: absolute; | ||
top: 22px; | ||
left: -4.9vw; | ||
font-family: var(--wp--preset--font-family--eb-garamond); | ||
font-size: var(--oops-font-size); | ||
line-height: var(--oops-font-size); | ||
opacity: 0.4; // Make the overlaid text more readable. | ||
|
||
@include break-small() { | ||
top: calc(var(--oops-font-size) * -0.26); | ||
} | ||
} | ||
|
||
h1 { | ||
margin-top: calc(var(--oops-font-size) * 0.6); | ||
margin-bottom: 30px; | ||
font-size: 38px; | ||
line-height: 40px; | ||
|
||
@include break-small() { | ||
margin-top: 0; | ||
font-size: 70px; | ||
line-height: 72px; | ||
} | ||
} | ||
|
||
a { | ||
color: var(--wp--preset--color--blue-3); | ||
text-decoration: underline; | ||
} | ||
|
||
.site-content-container .wp-block-search.wp-block-search__button-inside { | ||
width: 100%; | ||
margin-top: 40px; | ||
background-color: var(--wp--preset--color--white); | ||
border-radius: var(--wp--custom--button--border--radius); | ||
|
||
@include break-small() { | ||
max-width: 400px; | ||
} | ||
|
||
.wp-block-search__inside-wrapper { | ||
border: none; | ||
padding: 0 15px 0 0; | ||
|
||
@include break-small() { | ||
padding: 0 8px 0 0; | ||
} | ||
|
||
.wp-block-search__input { | ||
font-size: 20px; | ||
-webkit-appearance: none; /* Remove duplicate magnifying glass icon on Safari-mobile. */ | ||
|
||
padding: 12px 0 12px 19px; | ||
|
||
@include break-small() { | ||
padding: 6px 0 6px 14px; | ||
font-size: 14px; | ||
} | ||
} | ||
|
||
.wp-block-search__button { | ||
background-color: transparent; | ||
color: var(--wp--preset--color--black); | ||
margin: 0; | ||
padding: 0; | ||
border: | ||
var(--wp--custom--form--border--width) var(--wp--custom--form--border--style) | ||
var(--wp--custom--form--border--color); | ||
border-left: 0; | ||
|
||
svg { | ||
fill: currentColor; | ||
height: 36px; | ||
width: 36px; | ||
|
||
@include break-small() { | ||
height: 28px; | ||
width: 28px; | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
2 changes: 2 additions & 0 deletions
2
source/wp-content/themes/wporg-showcase-2022/src/style/style.scss
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