Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/wp-content/themes/ipsum/DESIGN.md
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,8 @@ Two classes in `style.css` hide a group when a block inside it renders nothing,
- **`comments-meta`** goes on the group around the comments link row in post lists. Core renders nothing for the Comments Link block when comments are closed, so the row, with its `·` and call to action, hides with it.
- **`author-card`** goes on the author chip in single posts. Core renders nothing for the Author Name block when the post type doesn't support authors, so the card, with its "Written by" byline and avatar, hides with it.

**`is-style-dotted-rule`** draws a 1px dotted rule in the text color at the start of a Group's line: left in LTR, right in RTL. Format Link uses it beside the link. It's named like a block style but isn't registered as one, so it isn't in the Styles panel; add it under Advanced > Additional CSS class(es).

### The `·` meta separator

The separator between meta items is built three ways, on purpose:
Expand Down
9 changes: 5 additions & 4 deletions src/wp-content/themes/ipsum/patterns/events-list.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
* @since Ipsum 1.0
*/

$ipsum_event_chevron = is_rtl() ? 'core/chevron-left-small' : 'core/chevron-right-small';
?>
<!-- wp:group {"metadata":{"name":"<?php echo esc_html_x( 'Events List', 'Name of the events list group', 'ipsum' ); ?>"},"style":{"spacing":{"padding":{"top":"var:preset|spacing|60","bottom":"var:preset|spacing|60"},"margin":{"top":"0","bottom":"0"}}},"layout":{"type":"constrained"}} -->
<div class="wp-block-group" style="margin-top:0;margin-bottom:0;padding-top:var(--wp--preset--spacing--60);padding-bottom:var(--wp--preset--spacing--60)"><!-- wp:group {"metadata":{"name":"<?php echo esc_html_x( 'Events List Wrapper', 'Name of the events list wrapper group', 'ipsum' ); ?>"},"style":{"spacing":{"blockGap":"var:preset|spacing|50"}},"layout":{"type":"default"}} -->
Expand Down Expand Up @@ -47,7 +48,7 @@
<p class="has-manrope-font-family has-small-font-size" style="font-style:normal;font-weight:700"><a href="#"><?php esc_html_e( 'Reserve a seat', 'ipsum' ); ?></a></p>
<!-- /wp:paragraph -->

<!-- wp:icon {"icon":"core/chevron-right-small"} /--></div>
<!-- wp:icon {"icon":"<?php echo esc_attr( $ipsum_event_chevron ); ?>"} /--></div>
<!-- /wp:group --></div>
<!-- /wp:group --></div>
<!-- /wp:group -->
Expand Down Expand Up @@ -75,7 +76,7 @@
<p class="has-manrope-font-family has-small-font-size" style="font-style:normal;font-weight:700"><a href="#"><?php esc_html_e( 'Reserve a seat', 'ipsum' ); ?></a></p>
<!-- /wp:paragraph -->

<!-- wp:icon {"icon":"core/chevron-right-small"} /--></div>
<!-- wp:icon {"icon":"<?php echo esc_attr( $ipsum_event_chevron ); ?>"} /--></div>
<!-- /wp:group --></div>
<!-- /wp:group --></div>
<!-- /wp:group -->
Expand Down Expand Up @@ -103,7 +104,7 @@
<p class="has-manrope-font-family has-small-font-size" style="font-style:normal;font-weight:700"><a href="#"><?php esc_html_e( 'Reserve a seat', 'ipsum' ); ?></a></p>
<!-- /wp:paragraph -->

<!-- wp:icon {"icon":"core/chevron-right-small"} /--></div>
<!-- wp:icon {"icon":"<?php echo esc_attr( $ipsum_event_chevron ); ?>"} /--></div>
<!-- /wp:group --></div>
<!-- /wp:group --></div>
<!-- /wp:group -->
Expand Down Expand Up @@ -131,7 +132,7 @@
<p class="has-manrope-font-family has-small-font-size" style="font-style:normal;font-weight:700"><a href="#"><?php esc_html_e( 'Reserve a seat', 'ipsum' ); ?></a></p>
<!-- /wp:paragraph -->

<!-- wp:icon {"icon":"core/chevron-right-small"} /--></div>
<!-- wp:icon {"icon":"<?php echo esc_attr( $ipsum_event_chevron ); ?>"} /--></div>
<!-- /wp:group --></div>
<!-- /wp:group --></div>
<!-- /wp:group --></div>
Expand Down
4 changes: 2 additions & 2 deletions src/wp-content/themes/ipsum/patterns/format-link.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
<p class="has-medium-font-size" style="font-style:normal;font-weight:700"><?php esc_html_e( 'Elsewhere: a long read on how lorem ipsum took over design—five centuries of scrambled Cicero standing in for the words to come.', 'ipsum' ); ?></p>
<!-- /wp:paragraph -->

<!-- wp:group {"metadata":{"name":"<?php echo esc_html_x( 'Link Line', 'Name of the link line group', 'ipsum' ); ?>"},"style":{"spacing":{"padding":{"right":"var:preset|spacing|20","left":"var:preset|spacing|20"}},"border":{"left":{"width":"1px","style":"dotted"}}},"fontSize":"medium","layout":{"type":"flex","flexWrap":"nowrap","justifyContent":"space-between"}} -->
<div class="wp-block-group has-medium-font-size" style="border-left-style:dotted;border-left-width:1px;padding-right:var(--wp--preset--spacing--20);padding-left:var(--wp--preset--spacing--20)"><!-- wp:paragraph {"metadata":{"name":"<?php echo esc_html_x( 'Link', 'Name of the link paragraph', 'ipsum' ); ?>"},"style":{"typography":{"lineHeight":"1"}},"fontSize":"small"} -->
<!-- wp:group {"metadata":{"name":"<?php echo esc_html_x( 'Link Line', 'Name of the link line group', 'ipsum' ); ?>"},"className":"is-style-dotted-rule","style":{"spacing":{"padding":{"right":"var:preset|spacing|20","left":"var:preset|spacing|20"}}},"fontSize":"medium","layout":{"type":"flex","flexWrap":"nowrap","justifyContent":"space-between"}} -->
<div class="wp-block-group is-style-dotted-rule has-medium-font-size" style="padding-right:var(--wp--preset--spacing--20);padding-left:var(--wp--preset--spacing--20)"><!-- wp:paragraph {"metadata":{"name":"<?php echo esc_html_x( 'Link', 'Name of the link paragraph', 'ipsum' ); ?>"},"style":{"typography":{"lineHeight":"1"}},"fontSize":"small"} -->
<p class="has-small-font-size" style="line-height:1"><a href="#"><?php esc_html_e( 'https://example.com', 'ipsum' ); ?></a></p>
<!-- /wp:paragraph --></div>
<!-- /wp:group --></div>
Expand Down
13 changes: 13 additions & 0 deletions src/wp-content/themes/ipsum/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,19 @@ footer.wp-block-template-part {
border-bottom-color: var(--wp--preset--color--accent-5);
}

/*
* Dotted rule: Format Link sets its link off with a rule at the start of the
* line, left in LTR and right in RTL. The border controls only set physical
* sides, so the rule is a logical property here. The class is named like a
* block style so the markup can stay as it is if it becomes one; a registered
* style would add a translatable title, which waits until after the WordPress
* 7.2 string freeze.
* https://github.com/WordPress/ipsum/pull/260
*/
.wp-block-group.is-style-dotted-rule {
border-inline-start: 1px dotted currentcolor;
}

/*
* Author cards: core hides the Author Name block for post types that do not
* support authors, but the hand-written "Written by" byline would remain.
Expand Down
Loading