diff --git a/themes/wporg-5ftf/css/components/_about.scss b/themes/wporg-5ftf/css/components/_about.scss index 1f50ab0..ac721d4 100644 --- a/themes/wporg-5ftf/css/components/_about.scss +++ b/themes/wporg-5ftf/css/components/_about.scss @@ -13,18 +13,11 @@ body.page-about .entry-content { > .wp-block-media-text, > .wp-block-button, > .wp-block-group { - margin-left: 40%; + margin-left: 35%; } p.is-style-wporg-tldr { margin-left: auto; } - - .wp-block-pullquote.is-style-solid-color { - position: absolute; - top: 800px; - left: 0; - width: 40%; - } } } diff --git a/themes/wporg-5ftf/css/objects/_hero.scss b/themes/wporg-5ftf/css/objects/_hero.scss new file mode 100644 index 0000000..541add5 --- /dev/null +++ b/themes/wporg-5ftf/css/objects/_hero.scss @@ -0,0 +1,19 @@ +// Defined here so we can use `ms`. +$size__spacing-unit: ms( 4 ); + +/* Fills 100% of the screen on mobile, and 100% of the content area on desktop */ +.is-style-wporg-hero { + position: relative; + left: -#{ $size__spacing-unit }; + width: calc( 100% + ( 2 * #{ $size__spacing-unit } ) ); + max-width: calc( 100% + ( 2 * #{ $size__spacing-unit} ) ); + clear: both; + + @include breakpoint( $breakpoint-tablet ) { + position: inherit; + left: inherit; + width: inherit; + max-width: inherit; + clear: inherit; + } +} diff --git a/themes/wporg-5ftf/css/style-editor.scss b/themes/wporg-5ftf/css/style-editor.scss index 4aae468..bb21341 100644 --- a/themes/wporg-5ftf/css/style-editor.scss +++ b/themes/wporg-5ftf/css/style-editor.scss @@ -38,5 +38,11 @@ } } +// Undo the positioning because it's coupled to the front end layout. Use mobile positioning in the editor. +.wp-block-pullquote.is-style-wporg-home-pullquote { + position: relative; + top: 0; + width: auto; +} -// font-family and face, etc? \ No newline at end of file +// font-family and face, etc? diff --git a/themes/wporg-5ftf/css/utilities/_pullquote.scss b/themes/wporg-5ftf/css/utilities/_pullquote.scss index fe84de4..a191aeb 100644 --- a/themes/wporg-5ftf/css/utilities/_pullquote.scss +++ b/themes/wporg-5ftf/css/utilities/_pullquote.scss @@ -1,18 +1,33 @@ -.wp-block-pullquote.is-style-solid-color { - background-color: $color__wporg-blue; +.wp-block-pullquote.is-style-wporg-home-pullquote { + padding: 0; + margin-bottom: 0; + border: none; blockquote { max-width: 100%; + margin: 0; + padding: 0; border: none; - color: $color__text-on-dark; + text-align: left; } @include breakpoint( $breakpoint-tablet ) { - background-color: $color__text-on-dark; + position: absolute; + top: 0; + left: -255px; + max-width: 250px; blockquote { border-left: none; color: $color__text-heading; } + + p { + font-size: 2.8rem; + + &:first-child { + margin-top: 0; + } + } } -} \ No newline at end of file +} diff --git a/themes/wporg-5ftf/functions.php b/themes/wporg-5ftf/functions.php index ad1be4b..d3f507e 100644 --- a/themes/wporg-5ftf/functions.php +++ b/themes/wporg-5ftf/functions.php @@ -79,11 +79,12 @@ function setup() { ) ); + // FYI, this is affected by https://github.com/WordPress/gutenberg/issues/16429. register_block_style( - 'core/image', + 'core/pullquote', array( - 'name' => 'wporg-hero', - 'label' => __( 'Hero (full width on mobile)', 'wporg-5ftf' ), + 'name' => 'wporg-home-pullquote', + 'label' => __( 'Homepage Pullquote', 'wporg-5ftf' ), 'style_handle' => 'wporg-style', ) );