Skip to content

Commit

Permalink
Theme: remove nested anchor in theme sheet (#34695)
Browse files Browse the repository at this point in the history
* remove nested anchor

* use div to avoid nested anchor warning

* tweak gradient to let more screenshot through
  • Loading branch information
donpark authored Jul 22, 2019
1 parent 007a765 commit 2e92590
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
13 changes: 5 additions & 8 deletions client/my-sites/theme/main.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -228,21 +228,18 @@ class ThemeSheet extends React.Component {
return demo_uri && ! retired;
}

// Render "Open Live Demo" pseudo-button for mobiles.
// This is a legacy hack that shows the button under the preview screenshot for mobiles
// but not for desktop (becomes hidden behind the screenshot).
renderPreviewButton() {
return (
<a
className="theme__sheet-preview-link"
onClick={ this.previewAction }
data-tip-target="theme-sheet-preview"
href={ this.props.demo_uri }
rel="noopener noreferrer"
>
<div className="theme__sheet-preview-link" data-tip-target="theme-sheet-preview">
<span className="theme__sheet-preview-link-text">
{ i18n.translate( 'Open Live Demo', {
context: 'Individual theme live preview button',
} ) }
</span>
</a>
</div>
);
}

Expand Down
2 changes: 1 addition & 1 deletion client/my-sites/theme/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@
height: 30%;
background: linear-gradient(
to bottom,
rgba( var( --color-neutral-0-rgb ), 1 ) 0%,
transparent 0,
rgba( var( --color-neutral-0-rgb ), 0.5 ) 40%,
var( --color-neutral-0 ) 93%
);
Expand Down

0 comments on commit 2e92590

Please sign in to comment.