From 2800f538bce09e74abcabe36dcd789777105a5f0 Mon Sep 17 00:00:00 2001 From: Thibaut Patel Date: Mon, 13 Dec 2021 16:13:57 +0100 Subject: [PATCH] Updated the product card classes refs https://github.com/TryGhost/Team/issues/1245 - Removes dependency from the product card css to other cards' css --- core/frontend/src/cards/css/product.css | 27 ++++++++++++++++++------- package.json | 2 +- yarn.lock | 8 ++++---- 3 files changed, 25 insertions(+), 12 deletions(-) diff --git a/core/frontend/src/cards/css/product.css b/core/frontend/src/cards/css/product.css index 5057037325..da0fc84a36 100644 --- a/core/frontend/src/cards/css/product.css +++ b/core/frontend/src/cards/css/product.css @@ -53,7 +53,7 @@ } .kg-product-card-description p:last-of-type { - margin-bottom: 6px; + margin-bottom: 6px; } .kg-product-card-description ul { @@ -68,11 +68,6 @@ margin-top: 0.2em; } -.kg-product-card-button { - grid-column: 1 / 3; - width: 100%; -} - .kg-product-card-rating { display: flex; align-items: center; @@ -113,4 +108,22 @@ .kg-product-card-button { justify-content: center; -} \ No newline at end of file + grid-column: 1 / 3; + width: 100%; + display: flex; + position: static; + align-items: center; + padding: 0 1.2em; + height: 2.4em; + line-height: 1em; + font-size: 0.95em; + font-weight: 600; + text-decoration: none; + border-radius: 5px; + transition: opacity 0.2s ease-in-out; +} + +.kg-product-card-btn-accent { + background-color: var(--ghost-accent-color); + color: #fff; +} diff --git a/package.json b/package.json index cb525ac852..d351e61066 100644 --- a/package.json +++ b/package.json @@ -73,7 +73,7 @@ "@tryghost/job-manager": "0.8.16", "@tryghost/kg-card-factory": "3.1.0", "@tryghost/kg-default-atoms": "3.1.0", - "@tryghost/kg-default-cards": "5.14.0", + "@tryghost/kg-default-cards": "5.14.2", "@tryghost/kg-markdown-html-renderer": "5.1.0", "@tryghost/kg-mobiledoc-html-renderer": "5.3.1", "@tryghost/limit-service": "1.0.6", diff --git a/yarn.lock b/yarn.lock index 7299e3bf82..637899f5e5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1503,10 +1503,10 @@ resolved "https://registry.npmjs.org/@tryghost/kg-default-atoms/-/kg-default-atoms-3.1.0.tgz" integrity sha512-FfROzVgqJWqJ7cVdS9dcALz7rnzNfV8zcrymAJrDTHDsqzAdMfSLe1tNQRm8zas9pyZLsD8zBGmLxG9dr4WFSA== -"@tryghost/kg-default-cards@5.14.0": - version "5.14.0" - resolved "https://registry.yarnpkg.com/@tryghost/kg-default-cards/-/kg-default-cards-5.14.0.tgz#87cd20559b8ae682aef2ea3702cc819bf3ef5779" - integrity sha512-1mKYM2xXBGpGxRQeI9P1cHPfqy2d+XK2gdE7/BNYVIwj/02P2pMclG3cZf8iA0XXGyudy4AKhQJeJiuF8uwetg== +"@tryghost/kg-default-cards@5.14.2": + version "5.14.2" + resolved "https://registry.yarnpkg.com/@tryghost/kg-default-cards/-/kg-default-cards-5.14.2.tgz#d7b1fb88089c368cd6ee023f2c2df52c7f0bca31" + integrity sha512-Y4ZTIeWC6qhADjY0tUJQNaLP37TJ2hc5uQgV/TYyLTWK8HXy+XbgqylEPoWZLMn5O+dlx917BfERWbJdJ/ashQ== dependencies: "@tryghost/kg-markdown-html-renderer" "^5.1.0" "@tryghost/url-utils" "^2.0.0"