Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import SwG button stylesheet #15566

Merged
merged 1 commit into from May 24, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
@@ -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} 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 @@ -176,7 +176,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