-
Notifications
You must be signed in to change notification settings - Fork 815
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
My Jetpack: improve My Jetpack link styles (#23007)
* [not verified] my-jetpack: tabs * [not verified] my-jetack: tweak :hover style to the Add link * [not verified] my-jetpack: tweak Manage your plan link * [not verified] changelog * [not verified] my-jetpack: do not redefine base styles * [not verified] my-jetpack: move out hover action link style * [not verified] my-jetpack: move out styles
- Loading branch information
Showing
5 changed files
with
103 additions
and
88 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
175 changes: 91 additions & 84 deletions
175
projects/packages/my-jetpack/_inc/components/product-card/style.module.scss
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,112 +1,119 @@ | ||
.container { | ||
// all css variables used down in product-card | ||
--product-card-shadow: rgba(0, 0, 0, 0.08); | ||
--product-card-shadow-size: 40px; | ||
--product-card-name-font-size: 24px; | ||
--product-card-description-font-size: 14px; | ||
--product-card-actions-font-size: 12px; | ||
--product-card-margin-base: 4px; | ||
--product-card-actions-size: 36px; | ||
--status-size: 8px; | ||
--status-active: #008710; | ||
--status-inactive: #646970; | ||
--status-error: #B32D2E; | ||
--status-plugin_absent: #C3C4C7; | ||
// all css variables used down in product-card | ||
--product-card-shadow: rgba(0, 0, 0, 0.08); | ||
--product-card-shadow-size: 40px; | ||
--product-card-name-font-size: 24px; | ||
--product-card-description-font-size: 14px; | ||
--product-card-actions-font-size: 12px; | ||
--product-card-margin-base: 4px; | ||
--product-card-actions-size: 36px; | ||
--jp-black: #000; | ||
--status-size: 8px; | ||
--status-active: #008710; | ||
--status-inactive: #646970; | ||
--status-error: #B32D2E; | ||
--status-plugin_absent: #C3C4C7; | ||
--jp-underline-thickness: 2px; | ||
|
||
padding: 24px; | ||
background: var( --jp-white ); | ||
border-radius: var( --jp-border-radius ); | ||
box-shadow: 0 0 var(--product-card-shadow-size) var(--product-card-shadow); | ||
height: 100%; | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: space-between; | ||
padding: 24px; | ||
background: var( --jp-white ); | ||
border-radius: var( --jp-border-radius ); | ||
box-shadow: 0 0 var(--product-card-shadow-size) var(--product-card-shadow); | ||
height: 100%; | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: space-between; | ||
|
||
&.is-purchase-required, | ||
&.plugin_absent { | ||
background: none; | ||
box-shadow: none; | ||
box-shadow: 0 0 0 1px var( --status-plugin_absent ) inset; | ||
} | ||
&.is-purchase-required, | ||
&.plugin_absent { | ||
background: none; | ||
box-shadow: none; | ||
box-shadow: 0 0 0 1px var( --status-plugin_absent ) inset; | ||
} | ||
} | ||
|
||
.name { | ||
display: flex; | ||
align-items: center; | ||
justify-content: space-between; | ||
width: 100%; | ||
font-size: var(--product-card-name-font-size); | ||
font-weight: 700; | ||
margin-bottom: var(--product-card-margin-base); | ||
display: flex; | ||
align-items: center; | ||
justify-content: space-between; | ||
width: 100%; | ||
font-size: var(--product-card-name-font-size); | ||
font-weight: 700; | ||
margin-bottom: var(--product-card-margin-base); | ||
} | ||
|
||
.description { | ||
font-size: var(--product-card-description-font-size); | ||
margin:0; | ||
font-size: var(--product-card-description-font-size); | ||
margin:0; | ||
} | ||
|
||
.actions { | ||
display: flex; | ||
align-items: center; | ||
justify-content: space-between; | ||
width: 100%; | ||
min-height: var(--product-card-actions-size); | ||
margin-top: calc(var(--product-card-margin-base) * 4); // 16px | ||
font-size: var(--product-card-actions-font-size); | ||
font-weight: 600; | ||
flex-wrap: wrap; | ||
display: flex; | ||
align-items: center; | ||
justify-content: space-between; | ||
width: 100%; | ||
min-height: var(--product-card-actions-size); | ||
margin-top: calc(var(--product-card-margin-base) * 4); // 16px | ||
font-size: var(--product-card-actions-font-size); | ||
font-weight: 600; | ||
flex-wrap: wrap; | ||
} | ||
|
||
.action-link-button:hover { | ||
color: var(--jp-black); | ||
text-decoration-thickness: var(--jp-underline-thickness); | ||
} | ||
|
||
.group { | ||
display: flex; | ||
height: var(--product-card-actions-size); | ||
display: flex; | ||
height: var(--product-card-actions-size); | ||
} | ||
|
||
.status { | ||
margin-left: var(--product-card-margin-base); | ||
white-space: nowrap; | ||
height: var(--product-card-actions-size); | ||
line-height: var(--product-card-actions-size); | ||
margin-left: var(--product-card-margin-base); | ||
white-space: nowrap; | ||
height: var(--product-card-actions-size); | ||
line-height: var(--product-card-actions-size); | ||
|
||
&:before { | ||
content: ""; | ||
display: inline-block; | ||
width: var(--status-size); | ||
height: var(--status-size); | ||
margin-right: var(--product-card-margin-base); | ||
border-radius: 50%; | ||
} | ||
&:before { | ||
content: ""; | ||
display: inline-block; | ||
width: var(--status-size); | ||
height: var(--status-size); | ||
margin-right: var(--product-card-margin-base); | ||
border-radius: 50%; | ||
} | ||
|
||
// in plugin absent case, there's not status flag | ||
$statuses: active, inactive, error; | ||
// in plugin absent case, there's not status flag | ||
$statuses: active, inactive, error; | ||
|
||
@each $status in $statuses { | ||
$color: var(--status-#{$status}); | ||
@each $status in $statuses { | ||
$color: var(--status-#{$status}); | ||
|
||
&.#{$status} { | ||
color: $color; | ||
&:before { | ||
background: $color; | ||
} | ||
} | ||
} | ||
&.#{$status} { | ||
color: $color; | ||
&:before { | ||
background: $color; | ||
} | ||
} | ||
} | ||
|
||
&.is-fetching { | ||
&:before { | ||
animation: blink-animation 0.5s linear infinite; | ||
} | ||
} | ||
&.is-fetching { | ||
&:before { | ||
animation: blink-animation 0.5s linear infinite; | ||
} | ||
} | ||
} | ||
|
||
@keyframes blink-animation{ | ||
0%{ | ||
opacity: 0; | ||
} | ||
50%{ | ||
opacity: 0.5; | ||
} | ||
100%{ | ||
opacity: 0; | ||
} | ||
0%{ | ||
opacity: 0; | ||
} | ||
50%{ | ||
opacity: 0.5; | ||
} | ||
100%{ | ||
opacity: 0; | ||
} | ||
} | ||
|
4 changes: 4 additions & 0 deletions
4
projects/packages/my-jetpack/changelog/update-my-jetpack-tweak-links
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Significance: patch | ||
Type: changed | ||
|
||
Improve My Jetpack link styles |