Skip to content

Commit

Permalink
Simplify: remove transitions
Browse files Browse the repository at this point in the history
Let’s tackle this in a separate PR
  • Loading branch information
getdave authored and ramonjd committed Jun 15, 2022
1 parent f98e4c8 commit 9448577
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 22 deletions.
8 changes: 0 additions & 8 deletions lib/load.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,14 +151,6 @@ function gutenberg_is_experiment_enabled( $name ) {
require __DIR__ . '/demo.php';
require __DIR__ . '/experiments-page.php';

add_filter(
'safe_style_css',
function( $safe_rules ) {
$safe_rules[] = 'transition';
return $safe_rules;
}
);

// Copied package PHP files.
if ( file_exists( __DIR__ . '/../build/style-engine/class-wp-style-engine-gutenberg.php' ) ) {
require_once __DIR__ . '/../build/style-engine/class-wp-style-engine-gutenberg.php';
Expand Down
8 changes: 0 additions & 8 deletions packages/style-engine/class-wp-style-engine.php
Original file line number Diff line number Diff line change
Expand Up @@ -144,14 +144,6 @@ class WP_Style_Engine {
),
),
),
'effects' => array(
'transition' => array(
'property_keys' => array(
'default' => 'transition',
),
'path' => array( 'effects', 'transition' ),
),
),
'elements' => array(
'link' => array(
'path' => array( 'elements', 'link' ),
Expand Down
9 changes: 3 additions & 6 deletions packages/style-engine/phpunit/class-wp-style-engine-test.php
Original file line number Diff line number Diff line change
Expand Up @@ -385,18 +385,15 @@ public function data_generate_styles_fixtures() {
),
),

'elements_and_element_states_with_css_vars_and_transitions' => array(
'elements_and_element_states_with_css_vars' => array(
'block_styles' => array(
'elements' => array(
'button' => array(
'color' => array(
'text' => 'var:preset|color|roastbeef',
'background' => '#000',
),
'effects' => array(
'transition' => 'all 0.5s ease-out',
),
':hover' => array(
':hover' => array(
'color' => array(
'text' => 'var:preset|color|pineapple',
'background' => 'var:preset|color|goldenrod',
Expand All @@ -410,7 +407,7 @@ public function data_generate_styles_fixtures() {
'css_vars' => true,
),
'expected_output' => array(
'css' => '.der-beste-button button { color: var(--wp--preset--color--roastbeef); background-color: #000; transition: all 0.5s ease-out; } .der-beste-button button:hover { color: var(--wp--preset--color--pineapple); background-color: var(--wp--preset--color--goldenrod); }',
'css' => '.der-beste-button button { color: var(--wp--preset--color--roastbeef); background-color: #000; } .der-beste-button button:hover { color: var(--wp--preset--color--pineapple); background-color: var(--wp--preset--color--goldenrod); }',
),
),
);
Expand Down

0 comments on commit 9448577

Please sign in to comment.