Skip to content

Commit

Permalink
🐛 adds in correct weight for amp-story-product-tag text (#37188)
Browse files Browse the repository at this point in the history
* adds in correct thin weight for product tag text

* updated to match figma spec

* added in Arial as the fallback fonts

* fixed trialign whitespace

* fixed imporatnce and line spacing property due to RTL texts

* added internation data formatting (will be expanded upon in future iterations)

* fix unit test

* fix unit test

* removed unnescessary spec

* added international formatting

* added in international number formatting

* added product price

* added back in currency

* removed fallback font

* fixed lightweight text for international currency
  • Loading branch information
jshamble authored Jan 6, 2022
1 parent 3b1371f commit e8d40b5
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
8 changes: 8 additions & 0 deletions extensions/amp-story-shopping/0.1/amp-story-shopping-tag.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,14 @@ amp-story-shopping-tag {
--i-amphtml-shopping-tag-backdrop-filter: blur(20px);
}

.amp-story-shopping-product-tag-text {
font-weight: 600 !important;
font-size: 11px !important;
line-height: 15.4px !important;
display: flex !important;
align-items: center !important;
}

/* Maintains the dot position in RTL mode */
[dir=rtl].amp-story-shopping-tag-inner {
flex-flow: row-reverse !important;
Expand Down
6 changes: 5 additions & 1 deletion extensions/amp-story-shopping/0.1/amp-story-shopping-tag.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,11 @@ export class AmpStoryShoppingTag extends AMP.BaseElement {
}
></span>
<span class="amp-story-shopping-tag-pill-text">
{this.tagData_['product-tag-text'] ||
{(this.tagData_['product-tag-text'] && (
<span class="amp-story-shopping-product-tag-text">
{this.tagData_['product-tag-text']}
</span>
)) ||
new Intl.NumberFormat(
this.localizationService_.getLanguageCodesForElement(
this.element_
Expand Down

0 comments on commit e8d40b5

Please sign in to comment.