diff --git a/core/core.libraries.yml b/core/core.libraries.yml index 4130ef46f2..a902f16242 100644 --- a/core/core.libraries.yml +++ b/core/core.libraries.yml @@ -908,6 +908,9 @@ drupal.dialog.off_canvas: version: VERSION js: misc/dialog/off-canvas.js: {} + css: + component: + misc/dialog/off-canvas.motion.css: {} dependencies: - core/jquery - core/drupal diff --git a/core/misc/dialog/off-canvas.motion.css b/core/misc/dialog/off-canvas.motion.css new file mode 100644 index 0000000000..dbf71b9353 --- /dev/null +++ b/core/misc/dialog/off-canvas.motion.css @@ -0,0 +1,10 @@ +/** + * @file + * Motion effects for off-canvas dialog. + */ + +.dialog-off-canvas__main-canvas { + -webkit-transition: all .7s ease; + -moz-transition: all .7s ease; + transition: all .7s ease; +} diff --git a/core/modules/outside_in/css/off-canvas.motion.css b/core/modules/outside_in/css/off-canvas.motion.css deleted file mode 100644 index e395fbb716..0000000000 --- a/core/modules/outside_in/css/off-canvas.motion.css +++ /dev/null @@ -1,32 +0,0 @@ -/** - * @file - * Motion effects for off-canvas dialog. - * - * Motion effects are in a separate file so that they can be easily turned off - * to improve performance if desired. - * - * @todo Move motion effects file into a core Off-Canvas library and add a - * configuration option for browser rendering performance to disable this - * file: https://www.drupal.org/node/2784443. - */ - -/* Transition the off-canvas dialog container, with 2s delay to match main canvas speed. */ -.ui-dialog-off-canvas .ui-dialog-content { - -webkit-transition: all .7s ease 2s; - -moz-transition: all .7s ease 2s; - transition: all .7s ease 2s; -} - -@media (max-width: 700px) { - .ui-dialog-off-canvas .ui-dialog-content { - -webkit-transition: all .7s ease; - -moz-transition: all .7s ease; - transition: all .7s ease; - } -} - -.dialog-off-canvas__main-canvas { - -webkit-transition: all .7s ease; - -moz-transition: all .7s ease; - transition: all .7s ease; -} diff --git a/core/themes/stable/css/core/dialog/off-canvas.motion.css b/core/themes/stable/css/core/dialog/off-canvas.motion.css new file mode 100644 index 0000000000..dbf71b9353 --- /dev/null +++ b/core/themes/stable/css/core/dialog/off-canvas.motion.css @@ -0,0 +1,10 @@ +/** + * @file + * Motion effects for off-canvas dialog. + */ + +.dialog-off-canvas__main-canvas { + -webkit-transition: all .7s ease; + -moz-transition: all .7s ease; + transition: all .7s ease; +} diff --git a/core/themes/stable/stable.info.yml b/core/themes/stable/stable.info.yml index 251ecbd534..2041f9dbdc 100644 --- a/core/themes/stable/stable.info.yml +++ b/core/themes/stable/stable.info.yml @@ -57,6 +57,10 @@ libraries-override: component: css/contextual.toolbar.css: css/contextual/contextual.toolbar.css + core/drupal.dialog.off_canvas: + css: + component: + misc/dialog/off-canvas.motion.css: css/core/dialog/off-canvas.motion.css core/drupal.dropbutton: css: component: