-
Notifications
You must be signed in to change notification settings - Fork 813
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Donations: Save block content (#16705)
* Adds support for saving the content of a donations block into the post content, so the published view contains the block output. * It also follows up #16593 (comment) and implements the content sync logic as suggested there.
- Loading branch information
Showing
12 changed files
with
645 additions
and
322 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
// Common styles for both views (editor and frontend). | ||
|
||
.wp-block-jetpack-donations { | ||
.donations__container { | ||
border: 1px solid $light-gray-700; | ||
} | ||
|
||
.donations__nav { | ||
display: flex; | ||
border-bottom: 1px solid $light-gray-700; | ||
} | ||
|
||
.donations__nav-item { | ||
font-weight: bold; | ||
display: inline-block; | ||
flex-grow: 1; | ||
text-align: center; | ||
font-size: 16px; | ||
padding: 16px; | ||
height: auto; | ||
border-radius: 0; | ||
border-left: 1px solid $light-gray-700; | ||
background-color: $white; | ||
color: $dark-gray-800; | ||
box-shadow: none; | ||
text-transform: none; | ||
text-decoration: none; | ||
outline: none; | ||
|
||
&:focus, | ||
&:active { | ||
border-radius: 0; | ||
} | ||
|
||
&:first-child { | ||
border-left: none; | ||
} | ||
|
||
// Complex selector needed to override specificity. | ||
&:not(:disabled):not([aria-disabled=true]):not(.is-secondary):not(.is-primary):not(.is-tertiary):not(.is-link):hover { | ||
background-color: $light-gray-100; | ||
box-shadow: none; | ||
} | ||
|
||
// Complex selector needed to override specificity. | ||
&.is-active, | ||
&.is-active:not(:disabled):not([aria-disabled=true]):not(.is-secondary):not(.is-primary):not(.is-tertiary):not(.is-link):hover { | ||
background-color: $blue-wordpress-700; | ||
box-shadow: none; | ||
color: $white; | ||
} | ||
} | ||
|
||
.donations__content { | ||
padding: 0 24px; | ||
} | ||
|
||
.donations__amounts { | ||
margin-top: 30px; | ||
margin-bottom: 30px; | ||
} | ||
|
||
.donations__amount { | ||
display: inline-block; | ||
margin-top: 0; | ||
margin-bottom: 0; | ||
} | ||
|
||
.donations__amount .wp-block-button__link { | ||
background-color: $white; | ||
color: $dark-gray-800; | ||
border: 1px solid $light-gray-700; | ||
cursor: text; | ||
text-decoration: none; | ||
text-transform: none; | ||
|
||
&.has-focus { | ||
box-shadow: 0 0 0 1px $white, 0 0 0 3px $blue-wordpress-700; | ||
outline: 2px solid transparent; | ||
outline-offset: -2px; | ||
} | ||
|
||
&.has-error { | ||
box-shadow: 0 0 0 1px $white, 0 0 0 3px $alert-red; | ||
outline: 2px solid transparent; | ||
outline-offset: -2px; | ||
} | ||
} | ||
|
||
.donations__custom-amount .donations__amount-value { | ||
margin-left: 4px; | ||
min-width: 60px; | ||
} | ||
|
||
.donations__separator { | ||
line-height: 8px; | ||
height: 8px; | ||
margin-bottom: 30px; | ||
margin-top: 30px; | ||
} | ||
|
||
.donations__donate-button { | ||
margin-bottom: 30px; | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
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.