Skip to content

Commit

Permalink
step-style: add <a><paper-button> styling
Browse files Browse the repository at this point in the history
All this time we've had the following "download" paper-button structure
on the official website at g.co/codelabs:

    <a href="..."><paper-button>download</paper-button></a>

Note that this is in accordance with the Polymer 1.0 recommendation
in https://elements.polymer-project.org/bower_components/paper-button/demo/index.html

Unfortunately, this is not how codelab-components were styled all this
time. A demo codelab has the inverse structure:

    <paper-button><a href="...">download</a></paper-button>

Here's where it's used in codelab-components repo:
https://github.com/googlecodelabs/codelab-components/blob/7397f708d210dfbb7348084033a32ba070ec4df4/demo/codelab.html#L74

As a consequence, the styling Will provided in a recent change in
f3e63d5
used the latter structure. We never noticed the difference because
before the styling refresh, the download button background and link
colors were very close.
  • Loading branch information
Alex Vaghin committed Apr 24, 2018
1 parent 7397f70 commit c22a15d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions step-style.html
Expand Up @@ -194,6 +194,13 @@
color: inherit !important;
}

.instructions ::content a paper-button {
/* The text-decoration styling doesn't apply to inline blocks.
We use this trick to remove underline when paper-button
is wrapped in the anchor element. */
display: inline-block;
}

.instructions ::content paper-button.colored {
background-color: var(--google-material-green-600);
}
Expand Down

0 comments on commit c22a15d

Please sign in to comment.