Make WordPress Core

Ticket #59934: 59934.diff

File 59934.diff, 3.6 KB (added by sabernhardt, 2 years ago)

moving the comments before register_block_style

  • src/wp-content/themes/twentytwentyfour/functions.php

     
    2121         */
    2222        function twentytwentyfour_block_styles() {
    2323
     24                /*
     25                 * Styles for the custom Arrow icon style of the Details block
     26                 * https://github.com/WordPress/twentytwentyfour/issues/119
     27                 */
    2428                register_block_style(
    2529                        'core/details',
    2630                        array(
    2731                                'name'         => 'arrow-icon-details',
    2832                                'label'        => __( 'Arrow icon', 'twentytwentyfour' ),
    29                                 /*
    30                                  * Styles for the custom Arrow icon style of the Details block
    31                                  */
    3233                                'inline_style' => '
    3334                                .is-style-arrow-icon-details {
    3435                                        padding-top: var(--wp--preset--spacing--10);
     
    4445                                }',
    4546                        )
    4647                );
     48
     49                /*
     50                 * Styles variation for post terms
     51                 * https://github.com/WordPress/gutenberg/issues/24956
     52                 */
    4753                register_block_style(
    4854                        'core/post-terms',
    4955                        array(
    5056                                'name'         => 'pill',
    5157                                'label'        => __( 'Pill', 'twentytwentyfour' ),
    52                                 /*
    53                                  * Styles variation for post terms
    54                                  * https://github.com/WordPress/gutenberg/issues/24956
    55                                  */
    5658                                'inline_style' => '
    5759                                .is-style-pill a,
    5860                                .is-style-pill span:not([class], [data-rich-text-placeholder]) {
     
    6769                                }',
    6870                        )
    6971                );
     72
     73                /*
     74                 * Styles for the custom checkmark list block style
     75                 * https://github.com/WordPress/gutenberg/issues/51480
     76                 */
    7077                register_block_style(
    7178                        'core/list',
    7279                        array(
    7380                                'name'         => 'checkmark-list',
    7481                                'label'        => __( 'Checkmark', 'twentytwentyfour' ),
    75                                 /*
    76                                  * Styles for the custom checkmark list block style
    77                                  * https://github.com/WordPress/gutenberg/issues/51480
    78                                  */
    7982                                'inline_style' => '
    8083                                ul.is-style-checkmark-list {
    8184                                        list-style-type: "\2713";
     
    8689                                }',
    8790                        )
    8891                );
     92
     93                /*
     94                 * Styles for the custom arrow nav link block style
     95                 * https://github.com/WordPress/twentytwentyfour/issues/528
     96                 */
    8997                register_block_style(
    9098                        'core/navigation-link',
    9199                        array(
    92100                                'name'         => 'arrow-link',
    93101                                'label'        => __( 'With arrow', 'twentytwentyfour' ),
    94                                 /*
    95                                  * Styles for the custom arrow nav link block style
    96                                  */
    97102                                'inline_style' => '
    98103                                .is-style-arrow-link .wp-block-navigation-item__label:after {
    99104                                        content: "\2197";
     
    104109                                }',
    105110                        )
    106111                );
     112
     113                /*
     114                 * Styles for the asterisk variation of the Heading block
     115                 * https://github.com/WordPress/twentytwentyfour/pull/471
     116                 */
    107117                register_block_style(
    108118                        'core/heading',
    109119                        array(
    110120                                'name'         => 'asterisk',
    111121                                'label'        => __( 'With asterisk', 'twentytwentyfour' ),
    112                                 'inline_style' => "
     122                                'inline_style' => '
    113123                                .is-style-asterisk:before {
    114                                         content: '';
     124                                        content: "";
    115125                                        width: 1.5rem;
    116126                                        height: 3rem;
    117127                                        background: var(--wp--preset--color--contrast-2, currentColor);
    118                                         clip-path: path('M11.93.684v8.039l5.633-5.633 1.216 1.23-5.66 5.66h8.04v1.737H13.2l5.701 5.701-1.23 1.23-5.742-5.742V21h-1.737v-8.094l-5.77 5.77-1.23-1.217 5.743-5.742H.842V9.98h8.162l-5.701-5.7 1.23-1.231 5.66 5.66V.684h1.737Z');
     128                                        clip-path: path("M11.93.684v8.039l5.633-5.633 1.216 1.23-5.66 5.66h8.04v1.737H13.2l5.701 5.701-1.23 1.23-5.742-5.742V21h-1.737v-8.094l-5.77 5.77-1.23-1.217 5.743-5.742H.842V9.98h8.162l-5.701-5.7 1.23-1.231 5.66 5.66V.684h1.737Z");
    119129                                        display: block;
    120130                                }
    121131
     
    138148
    139149                                .rtl .is-style-asterisk.has-text-align-left:before {
    140150                                        margin-right: auto;
    141                                 }",
     151                                }',
    142152                        )
    143153                );
    144154        }