Skip to content

Commit

Permalink
Fix module layout issues with Twenty Nineteen theme (#10589)
Browse files Browse the repository at this point in the history
<!--- Provide a general summary of your changes in the Title above -->

Fixes #10585
Fixes #10587

#### Changes proposed in this Pull Request:
<!--- Explain what functional changes your PR includes -->

- [x] Removes margin styles from Related Posts module, Recipe shortcodes and Presentation shortcodes.
- [x] Layout margin styles now come from the theme to prevent layout issues with other plugins. See: WordPress/twentynineteen#502 and WordPress/twentynineteen#534
- [x] Also remove margin styles from Akismet privacy notice since it also gets fixed by the theme here: WordPress/twentynineteen#533

#### Testing instructions:
<!-- Please include detailed testing steps, explaining how to test your change. -->
<!-- Bear in mind that context you working on is not obvious for everyone.  -->
<!-- Adding "simple" configuration steps will help reviewers to get to your PR as quickly as possible. -->
<!-- "Before / After" screenshots can also be very helpful when the change is visual. -->

* Test the Recipe or Presentation shortcode with the latest version of Twenty Nineteen: https://github.com/WordPress/twentynineteen/
* Test the layout against the Akismet notice with the latest version of Twenty Nineteen: https://github.com/WordPress/twentynineteen/

#### Proposed changelog entry for your changes:
<!-- Please do not leave this empty. If no changelog entry needed, state as such. -->

* Fix layout issues in Jetpack modules and shortcodes for Twenty Nineteen theme
  • Loading branch information
allancole authored and jeherve committed Nov 15, 2018
1 parent 1dd6fe3 commit 8121cb4
Showing 1 changed file with 17 additions and 61 deletions.
78 changes: 17 additions & 61 deletions modules/theme-tools/compat/twentynineteen.css
Original file line number Diff line number Diff line change
Expand Up @@ -71,58 +71,14 @@
margin-bottom: 1.75em;
}

/**
* Related Posts
*/

.entry-content > #jp-relatedposts {
margin: 32px 1rem;
max-width: calc(100vw - (2 * 1rem));
}

@media only screen and (min-width: 768px) {
.entry-content > #jp-relatedposts {
margin: 32px calc(2 * (100vw / 12));
max-width: calc(8 * (100vw / 12));
}
}

@media only screen and (min-width: 1168px) {
.entry-content > #jp-relatedposts {
max-width: calc(6 * (100vw / 12));
}
}

/**
* Akismet Comment Privacy Notice
*/

.akismet_comment_form_privacy_notice {
margin: calc(2 * 1rem) 1rem;
}

@media only screen and (min-width: 768px) {
.akismet_comment_form_privacy_notice {
margin: calc(3 * 1rem) calc(2 * (100vw / 12));
max-width: calc(6 * (100vw / 12));
}
}

/**
* Sharing
*/

.sharedaddy {
}

.sd-block {
line-height: 1;
}

.sd-like {
padding-bottom: 1.125em;
}

.entry div.sharedaddy h3.sd-title,
.entry h3.sd-title {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
Expand Down Expand Up @@ -173,18 +129,24 @@
box-shadow: none;
}


/**
* Related Posts
*/

.entry #jp-relatedposts {
padding-top: 0;
margin-top: 32px;
margin-bottom: 32px;
}

.entry #jp-relatedposts h3.jp-relatedposts-headline {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
font-size: 1.125em;
font-weight: 700;
letter-spacing: -0.02em;
line-height: 1.2;
margin-bottom: 0.5em;
margin-top: 0.5em;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
Expand Down Expand Up @@ -233,7 +195,7 @@
.entry #jp-relatedposts .jp-relatedposts-items .jp-relatedposts-post .jp-relatedposts-post-context,
.entry #jp-relatedposts .jp-relatedposts-items .jp-relatedposts-post .jp-relatedposts-post-date {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
font-size: 0.71111em;
font-size: 13px;
font-weight: 500;
}

Expand All @@ -253,6 +215,15 @@
}


/**
* Comments
*/

.comments-area .comments-title-wrap + .comment-respond .comment-reply-title {
display: none;
}


/**
* Widgets
*/
Expand Down Expand Up @@ -341,21 +312,6 @@
padding-bottom: 0.75rem;
}

/**
* Shortcodes
*/
.entry-content .jetpack-recipe,
.entry-content .presentation-wrapper {
margin: 32px 1rem;
}

@media only screen and (min-width: 768px) {
.entry-content .jetpack-recipe,
.entry-content .presentation-wrapper {
margin: 32px calc(2 * (100vw / 12));
}
}

/**
* Content Options
*/
Expand Down

0 comments on commit 8121cb4

Please sign in to comment.