-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MOOSE-80]: Adds block extension for social sharing styles.
- Loading branch information
Showing
4 changed files
with
61 additions
and
0 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
21 changes: 21 additions & 0 deletions
21
wp-content/themes/core/blocks/outermost/socialsharing/Social_Sharing.php
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,21 @@ | ||
<?php declare(strict_types=1); | ||
|
||
namespace Tribe\Theme\blocks\outermost\socialsharing; | ||
|
||
use Tribe\Plugin\Blocks\Block_Base; | ||
|
||
class Social_Sharing extends Block_Base { | ||
|
||
public function get_block_name(): string { | ||
return 'outermost/social-sharing'; | ||
} | ||
|
||
public function get_block_style_handle(): string { | ||
return 'outermost-social-sharing-style'; | ||
} | ||
|
||
public function get_block_path(): string { | ||
return 'outermost/socialsharing'; | ||
} | ||
|
||
} |
5 changes: 5 additions & 0 deletions
5
wp-content/themes/core/blocks/outermost/socialsharing/index.js
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,5 @@ | ||
/** | ||
* Scripts specific to this block | ||
*/ | ||
|
||
import './style.pcss'; |
33 changes: 33 additions & 0 deletions
33
wp-content/themes/core/blocks/outermost/socialsharing/style.pcss
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,33 @@ | ||
/** | ||
* Styles specific to this block | ||
*/ | ||
|
||
body { | ||
--ssb-button-color: var(--wp--preset--color--base-black); | ||
--ssb-button-hover-color: var(--wp--preset--color--base-white); | ||
--ssb-button-background-color: var(--wp--preset--color--base-white); | ||
--ssb-button-background-hover-color: var(--wp--preset--color--base-black); | ||
--ssb-button-border-color: var(--wp--preset--color--base-black); | ||
--ssb-button-border-hover-color: var(--wp--preset--color--base-white); | ||
} | ||
|
||
.wp-block-outermost-social-sharing, | ||
.editor-styles-wrapper .block-editor-block-list__layout.is-root-container .wp-block-outermost-social-sharing { | ||
background: transparent; | ||
transition: var(--transition); | ||
} | ||
|
||
.wp-block-outermost-social-sharing:not(.is-style-logos-only) .outermost-social-sharing-link { | ||
background-color: var(--ssb-button-background-color); | ||
color: var(--ssb-button-color); | ||
fill: var(--ssb-button-color); | ||
border: 1px solid var(--ssb-button-border-color); | ||
} | ||
|
||
.wp-block-outermost-social-sharing:not(.is-style-logos-only) .outermost-social-sharing-link:hover, | ||
.wp-block-outermost-social-sharing:not(.is-style-logos-only) .outermost-social-sharing-link:focus-visible { | ||
background-color: var(--ssb-button-background-hover-color); | ||
color: var(--ssb-button-hover-color); | ||
fill: var(--ssb-button-hover-color); | ||
border: 1px solid var(--ssb-button-border-hover-color); | ||
} |