Skip to content

Commit

Permalink
[MOOSE-179]: add details block summary link styling
Browse files Browse the repository at this point in the history
  • Loading branch information
GeoffDusome committed Jan 13, 2025
1 parent 3942389 commit beae8ae
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 0 deletions.
2 changes: 2 additions & 0 deletions wp-content/plugins/core/src/Blocks/Blocks_Definer.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
use Tribe\Theme\blocks\core\button\Button;
use Tribe\Theme\blocks\core\column\Column;
use Tribe\Theme\blocks\core\columns\Columns;
use Tribe\Theme\blocks\core\details\Details;
use Tribe\Theme\blocks\core\embed\Embed;
use Tribe\Theme\blocks\core\image\Image;
use Tribe\Theme\blocks\core\lists\Lists;
Expand Down Expand Up @@ -46,6 +47,7 @@ public function define(): array {
DI\get( Button::class ),
DI\get( Column::class ),
DI\get( Columns::class ),
DI\get( Details::class ),
DI\get( Embed::class ),
DI\get( Image::class ),
DI\get( Lists::class ),
Expand Down
13 changes: 13 additions & 0 deletions wp-content/themes/core/blocks/core/details/Details.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php declare(strict_types=1);

namespace Tribe\Theme\blocks\core\details;

use Tribe\Plugin\Blocks\Block_Base;

class Details extends Block_Base {

public function get_block_name(): string {
return 'core/details';
}

}
5 changes: 5 additions & 0 deletions wp-content/themes/core/blocks/core/details/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/**
* Scripts specific to this block
*/

import './style.pcss';
21 changes: 21 additions & 0 deletions wp-content/themes/core/blocks/core/details/style.pcss
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/**
* Styles specific to this block
*/

.wp-block-details {

/**
* Summary elements shouldn't contain text markup, but for some
* reason WP allows this markup within the summary text if you
* copy & paste it into the summary element. We should try to
* avoid this pattern, but since it's possible, we need to support
* it. This only applies to links within the summary element.
*/
summary {

a {

@mixin inline-text-link;
}
}
}

0 comments on commit beae8ae

Please sign in to comment.