-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ 🖍[amp story shopping] Shopping tag CSS (#37026)
* Shopping tag. * Delete code. * Update templates * Remove unrelated data. * Update comment * compress image * CSS * lint * lint * lint * lint * default style * dep check * Variable naming
- Loading branch information
1 parent
fa431d8
commit 833f52e
Showing
8 changed files
with
217 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
81 changes: 76 additions & 5 deletions
81
extensions/amp-story-shopping/0.1/amp-story-shopping-tag.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,78 @@ | ||
amp-story-shopping-tag { | ||
/** | ||
* This is placeholder for the shopping tag until syling is implemented. | ||
* Having a min-height enables the layoutCallback to be called. | ||
*/ | ||
min-height: 20px; | ||
font-family: 'Poppins', sans-serif !important; | ||
font-weight: 700 !important; | ||
cursor: pointer !important; | ||
width: auto !important; | ||
color: white !important; | ||
position: absolute !important; | ||
/* Height and width ensures layoutCallback is called. */ | ||
min-height: 1px !important; | ||
min-width: 1px !important; | ||
|
||
--i-amphtml-shopping-tag-bg-color: rgba(0, 0, 0, 0.3); | ||
--i-amphtml-shopping-tag-backdrop-filter: blur(20px); | ||
} | ||
|
||
.amp-story-shopping-tag-inner { | ||
height: 36px !important; | ||
display: flex !important; | ||
align-items: center !important; | ||
justify-content: center !important; | ||
} | ||
|
||
.amp-story-shopping-tag-dot { | ||
width: 16px !important; | ||
height: 16px !important; | ||
border-radius: 100% !important; | ||
background-color: var(--i-amphtml-shopping-tag-bg-color) !important; | ||
position: relative !important; | ||
display: flex !important; | ||
align-items: center !important; | ||
justify-content: center !important; | ||
margin-inline-end: 4px !important; | ||
backdrop-filter: var(--i-amphtml-shopping-tag-backdrop-filter) !important; | ||
} | ||
|
||
.amp-story-shopping-tag-dot:before { | ||
border-radius: 100% !important; | ||
content: '' !important; | ||
width: 8px !important; | ||
height: 8px !important; | ||
background: white !important; | ||
box-shadow: 0px 2px 8px var(--i-amphtml-shopping-tag-bg-color) !important; | ||
} | ||
|
||
.amp-story-shopping-tag-pill { | ||
display: flex !important; | ||
align-items: center !important; | ||
border-radius: 18px !important; | ||
height: 100% !important; | ||
background-color: var(--i-amphtml-shopping-tag-bg-color) !important; | ||
padding: 0 6px !important; | ||
backdrop-filter: var(--i-amphtml-shopping-tag-backdrop-filter) !important; | ||
} | ||
|
||
.amp-story-shopping-tag-pill-image { | ||
width: 24px !important; | ||
height: 24px !important; | ||
display: flex !important; | ||
align-items: center !important; | ||
justify-content: center !important; | ||
background-color: rgba(0, 0, 0, 0.6) !important; | ||
border-radius: 100% !important; | ||
background-image: url('data:image/svg+xml;charset=utf-8,<svg width="12" height="12" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M11.49 5.755 6.24.505a1.16 1.16 0 0 0-.823-.338H1.334A1.17 1.17 0 0 0 .167 1.333v4.084c0 .32.128.612.344.828l5.25 5.25c.21.21.502.338.823.338.32 0 .612-.128.822-.344l4.083-4.083a1.14 1.14 0 0 0 .345-.823c0-.32-.134-.618-.345-.828ZM2.208 3.083a.874.874 0 1 1 0-1.75.874.874 0 1 1 0 1.75Z" fill="#fff"/></svg>') !important; | ||
background-repeat: no-repeat !important; | ||
background-position: center !important; | ||
} | ||
|
||
.amp-story-shopping-tag-pill-text { | ||
font-size: 14px !important; | ||
padding: 0 6px 0 4px !important; | ||
} | ||
|
||
.amp-story-shopping-tag-pill-text::before { | ||
content: '$' !important; | ||
font-weight: 400 !important; | ||
padding-inline-end: 3px !important; | ||
font-size: 10px !important; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.