Skip to content

Commit

Permalink
Import SwG button stylesheet (#15566)
Browse files Browse the repository at this point in the history
  • Loading branch information
Dima Voytenko committed May 24, 2018
1 parent 2cfd36c commit 26aba93
Show file tree
Hide file tree
Showing 4 changed files with 275 additions and 1 deletion.
@@ -0,0 +1,17 @@
/**
* Copyright 2015 The AMP HTML Authors. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS-IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

@import url("../../../third_party/subscriptions-project/swg-button.css");
Expand Up @@ -14,6 +14,7 @@
* limitations under the License.
*/

import {CSS} from '../../../build/amp-subscriptions-google-0.1.css';
import {
ConfiguredRuntime,
Fetcher,
Expand All @@ -23,6 +24,7 @@ import {DocImpl} from '../../amp-subscriptions/0.1/doc-impl';
import {Entitlement, GrantReason} from '../../amp-subscriptions/0.1/entitlement';
import {PageConfig} from '../../../third_party/subscriptions-project/config';
import {Services} from '../../../src/services';
import {installStylesForDoc} from '../../../src/style-installer';
import {parseUrlDeprecated} from '../../../src/url';

const TAG = 'amp-subscriptions-google';
Expand Down Expand Up @@ -98,6 +100,9 @@ export class GoogleSubscriptionsPlatform {
/** @private {boolean} */
this.isGoogleViewer_ = false;
this.resolveGoogleViewer_(Services.viewerForDoc(ampdoc));

// Install styles.
installStylesForDoc(ampdoc, CSS, () => {}, false, TAG);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion gulpfile.js
Expand Up @@ -177,7 +177,7 @@ declareExtension('amp-position-observer', '0.1');
declareExtension('amp-date-picker', '0.1', {hasCss: true});
declareExtension('amp-image-viewer', '0.1', {hasCss: true});
declareExtension('amp-subscriptions', '0.1', {hasCss: true});
declareExtension('amp-subscriptions-google', '0.1');
declareExtension('amp-subscriptions-google', '0.1', {hasCss: true});
/**
* @deprecated `amp-slides` is deprecated and will be deleted before 1.0.
* Please see {@link AmpCarousel} with `type=slides` attribute instead.
Expand Down

0 comments on commit 26aba93

Please sign in to comment.